relational creation
Hi, I noticed in relational.cpp there is a line like this: (Should be one line but my mailer brakes it up) ----------------------- new relational(lh.eval(level-1),rh.eval(level-1),o))->setflag(status_flags::dynallocated | status_flags::evaluated); ---------------------- The question I have is if I am creating relationals using the "new" operator do I need to call the "->setflag(status_flags::dynallocated)" function? Thanks, Ben.
Hi! On Mon, May 20, 2002 at 03:15:02PM -0500, Ben Sapp wrote:
The question I have is if I am creating relationals using the "new" operator do I need to call the "->setflag(status_flags::dynallocated)" function?
Setting the dynallocated flag puts the object under the control of GiNaC's garbage collection. This means it will be deleted automatically once the last reference to that object (from an 'ex') disappears. And this is probably what you want. If you don't set the dynallocated flag you have to delete the object yourself eventually (and GiNaC will make 'dynallocated' copies of it as it needs them). Bye, Christian -- / Coding on PowerPC and proud of it \/ http://www.uni-mainz.de/~bauec002/
participants (2)
-
Ben Sapp
-
Christian Bauer