The decrement inside the IF is permanent? Even if the IF statement
evaluates to false?
public void down () {
if (--ref_count == 0) {
delete (void*) this;
}
}
Steven N. Oliver
On Wed, Jan 15, 2014 at 12:28 PM, Luca Bruno <[email protected]> wrote:
> On 15/01/2014 17:50, Steven Oliver wrote:
>
>> I'm looking at
>> https://wiki.gnome.org/Projects/Vala/ReferenceHandling
>>
>> In the section titled "Memory management for compact classes with
>> reference
>> counting" the custom "up" function, as expected, increments the reference
>> count. The custom "down" function though does not. I would think it
>> should.
>>
> It does decrease the ref_count.
> _______________________________________________
> vala-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/vala-list
>
_______________________________________________
vala-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/vala-list