19.06.2015 Views

cmake - FEniCS Project

cmake - FEniCS Project

cmake - FEniCS Project

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Cross language reference counting<br />

Consider some python code where a python object is sent to<br />

some wrapped C/C++ function:<br />

def somefunc(x):<br />

y = filter(x)<br />

c = SomeC++function(y)<br />

return c<br />

c.doSomething() #seg.faults<br />

Now, if the object ‘c’ use a pointer to data living<br />

inside y, we get a seg.fault when c.doSomething() is<br />

called, due to garbage collection.<br />

© 2006

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!