On 02/28/2010 02:16 PM, Ellery Newcomer wrote:
RAII!(Foo) foo(int i){
return RAII!(Foo)(new Foo(i));
}

One thing I'm curious about in particular is how to ensure that the destructor of Foo doesn't get called inside foo.

With this particular code, it evidently doesn't, but I can't tell if it's a guarantee of the language, or a side effect of some optimization.

Reply via email to