On 27 October 2013 15:59, Andre Masella <an...@masella.name> wrote: > The increase in reference happens inside ArrayList *before* it returns the > value.
Ok, got it. > You can't assign an owned variable to an unowned variable and expect good > things to happen because there might be no other owners What if I have an ArrayList in the main() function which holds a bunch of objects, after that all I need are weak refs to the elements into that list.? The list will never die until the app ends. I'm guessing this would mean manual pointer work and freeing. > I really don't see the fuss in their being a higher reference count that you > think. The cost is small, particularly if your program isn't multi-threaded. It's not so much a fuss as me trying to understand the flow of things. I come from Pythonville, so the spectre of memory leaks is new to me. Thanks again, great info! \d _______________________________________________ vala-list mailing list vala-list@gnome.org https://mail.gnome.org/mailman/listinfo/vala-list