On Thu, 2014-01-09 at 22:10 +0100, Luca Bruno wrote:
> On Thu, Jan 9, 2014 at 9:58 PM, Tal Hadad
> wrote:
>
> > > That would be a memory leak.
> > No it wouldn't:
> > If the "if" statement is false, then it should delete it in the end of the
> > block.
> >
> > You might afraid the complicity of
On Thu, Jan 9, 2014 at 9:58 PM, Tal Hadad wrote:
> > That would be a memory leak.
> No it wouldn't:
> If the "if" statement is false, then it should delete it in the end of the
> block.
>
> You might afraid the complicity of valac calculation.
> That could be resolved - using two C variables - on
ammer solve this(including me) problem by saving
this variable in different unowned variable, but this is not
intuitive(especially for a
new language) and may raise many bugs.
Tal
Date: Thu, 9 Jan 2014 21:04:16 +0100
Subject: Re: [Vala] Change in 0.23.1 for array ownership and .length parameter
t; statement, just like I suggest.
>
> Tal
>
> > Date: Tue, 7 Jan 2014 09:24:40 +0100
> > From: lethalma...@gmail.com
> > To: vala-list@gnome.org
> > Subject: Re: [Vala] Change in 0.23.1 for array ownership and .length
> parameter
> >
> > On 07/01/2014
o: vala-list@gnome.org
> Subject: Re: [Vala] Change in 0.23.1 for array ownership and .length
> parameter
>
> On 07/01/2014 06:46, Tal Hadad wrote:
> > This case trigger me a question I wanted to ask before.
> > Why transforming ownership is nulling the original variable?
On 07/01/2014 06:46, Tal Hadad wrote:
This case trigger me a question I wanted to ask before.
Why transforming ownership is nulling the original variable?
Instead of nulling, maybe just change variable to behave as unowned.
You might say that there is a problem in my solution, like this code:
Hi Tal,
On Tue, 2014-01-07 at 07:46 +0200, Tal Hadad wrote:
> The user might use "ar" varible later and it will crush he's application.
> If he was lucky enough, he would realize that ar is null.
> It's not easy to find that this line causing it.
Risking dangling pointers is much worse than null
From: j...@yorba.org
> To: vala-list@gnome.org
> Subject: [Vala] Change in 0.23.1 for array ownership and .length parameter
>
> Just wanted to give everyone a head's-up about a change that appeared
> in Vala 0.23. Previously you could do this in Vala:
>
> uint8[] ar =
Just wanted to give everyone a head's-up about a change that appeared
in Vala 0.23. Previously you could do this in Vala:
uint8[] ar = new uint8[10];
// ... fill ar with interesting bytes ...
process((owned) ar, ar.length);
... where process() takes an array and a length field (sometimes
beca