pymad / cpymad

cPyMAD is a python interface to Mad-X using cython and libmadx
http://cern.ch/pymad
Apache License 2.0
3 stars 3 forks source link

Inconsistency in table_from_memory code #45

Closed coldfix closed 10 years ago

coldfix commented 10 years ago

When looking at the code that is used to read tables from memory, I noticed an inconsistency in the memory management:

The array buffer returned by table_get_column() is neither freed nor is it copied to the numpy array. This will result in either:

UPDATE: Just realized that the second case should be no problem, since the array is copied over the Pipe immediately. Still, its worth mentioning, see 629ae41.

Eothred commented 10 years ago

I'm no genious here, I just tried to hack it together until it worked.. So feel free to make it more safe! Maybe that is why some of the models are crashing...