On Fri, Mar 23, 2012 at 3:43 AM, Ali Çehreli <[email protected]> wrote:
> You can register on GC if you wrap the resources in a class. Then the > class object's destructor would call the clean up code. The problem is, it > is undeterministic when the destructor will be called, or will it be called > at all! > > Or you can wrap in a struct which has deterministic destruction like in > C++, when leaving scopes. > The object is long lived, so the class wrapper is the way to go. Thanks
