[Tutor] memory allocation error

Marcus m_konermann@gmx.de
Tue, 23 Apr 2002 17:56:12 +0200


Hello !

I've got Problems with memory allocation errors after wrapping C++ code. 
I want to create a few instances (sap_h1, sap_h2) from the class 
simanneal_parameter(), exsisting in a module named simannealfile.py. 
simannealfile.py is a python shadow class created with SWIG. And now, 
after running a script, consist of the following instances, i get a 
memory allocation error under WindowsXP and also under Windows 98. I 
tried different systems to check, if my hardware was ok.

sap_h1=simannealfile.simanneal_parameter()
sap_h2=simannealfile.simanneal_parameterPtr(sap_h1)    

The allocation error will also be there, if i build up a few more 
different instances of one class. And perhaps some time, if i declare 
the same instances a little bit later in my dummy file, there wereīnt 
any allocation errors at all . I absolutly donīt know if itīs a problem 
of SWIG (C++  -> Python) or of Python.
Perhaps anyone has got an idea ?

Thanks for your help
greetings
Marcus