Re: [Vala] Change in 0.23.1 for array ownership and .length parameter
- From: Jürg Billeter <j bitron ch>
- To: Tal Hadad <tal_hd hotmail com>
- Cc: Vala Mail List <vala-list gnome org>
- Subject: Re: [Vala] Change in 0.23.1 for array ownership and .length parameter
- Date: Tue, 07 Jan 2014 09:18:37 +0100
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 pointers as that can
lead to memory corruption, which may be difficult to detect under normal
operation. Crashes triggered by null pointer dereference are typically
much easier to debug and fix.
If you're sure that the object is still valid after the ownership
transfer, it might be better to not transfer ownership at all or
postpone the transfer.
Regards,
Jürg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]