View Full Version : SWIG python / c++ class problem (probably with obvious solution)

March 9th, 2009, 05:23 AM
Hi All,

I've created a python extension with SWIG. On the c++ side, there is a class that holds a few arrays, which are created with:

foo = new int[xyz]

However, whatever I put in these arrays is totally corrupted when it comes back out.

(I'll put in 12 and get back 510321685)

Any ideas what might be causing this? I can't think of ANY reason why this might be happening.