Re: [Vala] add check lifetime
- From: Michele Dionisio <michele dionisio gmail com>
- To: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
- Cc: Vala List <vala-list gnome org>
- Subject: Re: [Vala] add check lifetime
- Date: Sat, 17 Sep 2016 18:14:15 +0200
I have add bug 'Bug 771594 - check lifetime assigment to unowned and
weak reference' on https://bugzilla.gnome.org/show_bug.cgi?id=771594
I have try also to create a patch of 1 of the 2 doungerous scenarious.
regards.
2016-09-17 8:46 GMT+02:00 Nor Jaidi Tuah <norjaidi tuah ubd edu bn>:
On Sat, 2016-09-17 at 05:56 +0000, michele dionisio gmail com wrote:
Parameter is unowned by default. So when you print a it point to an
object aleady free.
You are right. Thank you for pointing out
this trap.
I agree with you that the compiler should warn
about this. I thought that 'unowned' is like
bare pointers; if you use them, you take care of
memory, not the compiler. But this default
unowned means that the compiler must be
responsible, not the programmer.
Nice day
Nor Jaidi Tuah
PRIVILEGED/CONFIDENTIAL information may be contained in this message. If you are neither the addressee
(intended recipient) nor an authorised recipient of the addressee, and have received this message in error,
please destroy this message (including attachments) and notify the sender immediately. STRICT PROHIBITION:
This message, whether in part or in whole, should not be reviewed, retained, copied, reused, disclosed,
distributed or used for any purpose whatsoever. Such unauthorised use may be unlawful and may contain
material protected by the Official Secrets Act (Cap 153) of the Laws of Brunei Darussalam. DISCLAIMER:
We/This Department/The Government of Brunei Darussalam, accept[s] no responsibility for loss or damage
arising from the use of this message in any manner whatsoever. Our messages are checked for viruses but we
do not accept liability for any viruses which may be transmitted in or with this message.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]