Re: Re: Why there's still ONE element left after g_slist_free () ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Its old hat to C programmers that you set any object to NULL when you're done with it, which returns the memory used to the heap. That's not necessary with languages that have garbage collection like Java, Python, etc.

On May 13, 2009 3:56am, PenT <pentie@xxxxxxxxx> wrote:
> Thanks to Yeti, tml and Pfeiffer, I finally realized what happend to the GSList.
>
> May be I'm spoiled by Python, Java that I had the strange SHOULD-BE-NULL thought, now I know if I need to reuse the GSList* variable,  the first thing is to assign NULL to it after g_slist_free (),  also surprised g_slist_length() didn't gave a segmentation fault to me, aha.
>
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux