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 _______________________________________________ vala-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/vala-list
