lua-users home
lua-l archive

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


On Wed, Jul 23, 2008 at 1:34 PM,  <Brad_Byrd@playstation.sony.com> wrote:
> So, two questions arise:
> 1) Is there a better way to manage refs in C++ than the way I'm doing it?
> 2) Is there a way to do this so that everything gets collected in the same
> call to collectgarbage()?

as a general advice, don't wait for __gc() to destroy your objects.
garbage collection is for memory, there's no written contract about
when it will collect your objects.  add close() methods (or similar)
to finish useful lifetime.

-- 
Javier