[GiNaC-list] memory allocation, matrices

Marko Riedel mriedel at lsi.upc.edu
Mon Sep 11 15:22:19 CEST 2006


Richard B. Kreckel writes:
 > Hi,
 > 
 > Sorry, most of what you say about mixing Objective C and C++ sounds 
 > obscure to me, since I don't know any Objective C.
 > 
 > Marko Riedel wrote:
 > 
 > >Thank you for the concise explanation. I plan on mixing Objective C
 > >and C++ and this leads to another question. Suppose I store a GiNaC
 > >object in an instance variable of an Objective C object. This
 > >operation should increment the referene count of the GiNaC object,
 > >right?
 > >  
 > >
 > 
 > If this storing in an instance variable involves calling a constructor 
 > or assingment operator, which I do hope, then the answer is yes.
 > 
 > >Next suppose that the deallocation method of the Objective C
 > >object is invoked. Now I need an explicit release of the GiNaC
 > >object. How would I do this?
 > >  
 > >
 > 
 > Wouldn't deallocation invoke the destructor ex::~ex()?
 > 

Greetings.

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? Deallocation in Objective C is not quite the
same as in C++.

Best regards,

Marko

+-------------------------------------------------------------+
| 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