[GiNaC-list] memory allocation, matrices

Marko Riedel mriedel at lsi.upc.edu
Mon Sep 11 23:17:06 CEST 2006

Richard B. Kreckel writes:
 > Hi!
 > Marko Riedel wrote:
 > >I have an additional question. Can you present me with a list of
 > >scenarios in which I would need to manually invoke ex::~ex(),
 > >including a few examples?
 > >  
 > >
 > In C++, you should never invoke dtors explicitly, unless you do
 > such dirty tricks as discussed in June on this list:
 > <http://www.ginac.de/pipermail/ginac-list/2006-June/thread.html>.


Thanks! This thread is exactly what I was looking for. Can you briefly
explain the meaning of reinterpret_cast<GiNaC::ex*>? Wouldn't
<GiNaC::ex*> be sufficient? Also, in GiNaC, if I have an expression
that is actually a symbol, say, how do I determine at compile time
what destructor to call, ~ex or ~symbol?

I will need to invoke the destructor explicitly in the deallocation
code of my Objective C object.

Best regards,


| Marko Riedel, EDV Neue Arbeit gGmbH, mriedel at lsi.upc.edu    |
| http://www.geocities.com/markoriedelde/index.html           |

More information about the GiNaC-list mailing list