Jeroen Demeyer on Mon, 20 Aug 2018 10:28:47 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Using lazy vectors in library mode


I have a question about using "lazy vectors" such as ell structures.

It seems to me that the usual programming model manipulating avma may lead to memory leaks with such structures. So one should call obj_free() on an elliptic curve before resetting avma.

However, it seems difficult to automate this: as far as I know, a program cannot know that ellinit() returns a lazy vector. So I wonder how GP and GP2C deal with this. I am asking this in the context of the Python interface, where this is probably giving memory leaks currently.


Jeroen.