-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Potential memory leak #126
Comments
Hello @atsiflis! We're happy the library has been useful to you :-) I agree that it may seem like a memory leak. As far as I know (and remember), the evaluation of a spline should not result in any allocation of memory (that is not also freed before returning), except for the data structure to hold the result. However, the Python interface makes reasoning about this a bit harder, as it uses a garbage collector which may run at (seemingly) random times. Ideally, the memory usage of this should converge to some constant:
I would have to have a more thorough look to determine if this is actually a memory leak, or if this is just Python playing us a trick. Thank you for the report and the example, it will be very useful for debugging purposes! |
I also meet the same problem. |
I can't solve this problem, but I think I can alleviate it.
After that, still have a memory leak problem, but the leak speed is very slow. |
Hi, @yj-Roy. Good catch! I have not investigated this problem, but it seems reasonable to implement the del method for all the Python classes (not only DataTable) to prevent memory leakage. It would be great if you could prepare and submit a pull request so that we can fix the problem for all users. Bjarne |
Hi,
Thank you for making this very useful library available.
I am using it in a Python script that builds a spline once and then evaluates it multiple times. I have noticed that the memory allocation of the Python process increases by a few MB after each evaluation and I am considering whether this is due to some memory leak in splinter. To investigate this, I run the following simplified example (adapted from the basic usage example)
from which I get
Given that the call to bspline.eval() increased the memory allocated to the process by 73728 bytes but the size of the reachable objects increased by only 444 bytes, is it right to conclude that there is a memory leak in splinter?
The text was updated successfully, but these errors were encountered: