On Tue, Sep 13, 2005 at 03:08:51PM +0800, Dongxu Ma wrote: > Hi all, > Another question, is there any better way to port a class method which > returns > an object. Like this: > foo foo::bar2() > since the returned object is local, which is usually allocated on stack, I > have to > new an object on heap and copy the content from the local one in my perlxs > code. Is there a better way to handle this case?
Well, aside from "always allocate it on the heap in the first place", I believe not. Nicholas Clark
