-
Notifications
You must be signed in to change notification settings - Fork 3
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
This would leads to memory leak #10
Comments
You need to clarify your concern. Is it about memory leaks when using cache ? Most of cache operation ARE about keeping information in memory. I can understand however that we might here tighten a little the requirements. Can you really elaborate on your concerns here, they still don't make fully sense for me. |
I implemented a game server with python. I create a After the server runned for some time, may be a day or so, the process got OOM. After spending hours of hard work, I found the I think |
Okay, thanks. Let me help you here. This is an important topic, and there are solutions that should work : giving you a nice caching mecanism and avoid memory leaks. First, at first glance, it seems perfectly normal that a caching mecanism keeps cache instances in memory. This is what caching is about no ? Keeping data already computed to spit them out when you require the result of the computation again without having to do the computation. Having said that, there are many ways to control how much of this additional data you'll want to save. By default, This is done by using some other kind of cache stores that you can plugin as the cache store in However, if you notice still some memory leaks while using a controled cache store, this is abnormal and should be reported to me. |
This is copy of @TimothyZhang's stackoverflow comment
This would leads to memory leak.
Create an instance c of MyClass, and inspect it with objgraph.show_backrefs([c], max_depth=10), there is a ref chain from the class object MyClass to c. That is to say, c would never been released until the MyClass been released.
The text was updated successfully, but these errors were encountered: