How is that going to work with stuff Ive not got python versions for, like tons of com objects (ie the D3d classes GetDevice() method that returns IDirect3DDevice9*). To do what your sugessting ive either got to cast that to a Py::Int for the GetDevice method which is both messy and looses all type safty, or I spend ages writiing python wrappers for every single Direct3D object...

Is there no way to use a c++ class directly at all? I'm not massivly fussed about having refrence counting done for me on the c++ side providing it is cleared up if I change the count to zero.

What about something like what ive got but useing: the onyl objects I'll be doing this with are ones I allocated with new anyway so the matching new/delete rule is still followed.

if(!--obj->ob_refcnt)delete obj;


Get Windows Live Messenger on your Mobile. Click Here!