On Jun 17, 2005, at 12:36 AM, Milan Tomic wrote:


Is there any doc explaining how Janitor works?

No, Janitor is an internal implementation detail (and an internal API). You're welcome to read the source...it's not very complicated ;)

-jdb


I'm using it like this:

MyClass * myVar = NULL;
Janitor<MyClass> j_myVar(myVar);
j_myVar.release();

try
{
    myVar = new MyClass();
    j_myVar. <-- How to tell Janitor that var is now allocated and that it should release it?
}
catch (...)
{
    //
}



Reply via email to