From: David F. <dav...@gm...> - 2012-01-18 13:07:40
|
> Hi, > > Here is a more simple example that demonstrates my problem. Hi, thanks for the answer! > I set up and and ran your example. I too get the crash when I try to print > the elements. However, I also get this output when I just checked types: > >>>> for e in vec: > ... type(e) > ... > swig/python detected a memory leak of type 'unknown', no destructor found. > <type 'SwigPyObject'> > swig/python detected a memory leak of type 'unknown', no destructor found. > <type 'SwigPyObject'> > swig/python detected a memory leak of type 'unknown', no destructor found. > <type 'SwigPyObject'> I also have the memory leak message with 'for e in vec: pass' > So might the crash be occurring because you are trying to print an opaque > type ('SwigPyObject') instead of the type of the enum? I'm expecting to get a type 'int' (with 'for e in vec: print type'), and a values 0,1,2 (with 'for e in vec: print e'). I just opened a bug on the bug tracking system (id:3475492). |