Skip to content
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

closing a project does not release all memory #483

Open
leoxxw opened this issue Jan 5, 2018 · 2 comments
Open

closing a project does not release all memory #483

leoxxw opened this issue Jan 5, 2018 · 2 comments

Comments

@leoxxw
Copy link

leoxxw commented Jan 5, 2018

After analysis, I found that the shotcut will not release the memory when it closes the project, and I think this is the reason for MLT. Is there any way to solve it?I tried to modify the structure of the code, but I found that many variables were static local variables that could not be released.I'm troubled.

@ddennedy ddennedy changed the title shotcut The shutdown project does not release memory closing a project does not release memory Jan 5, 2018
@ddennedy ddennedy changed the title closing a project does not release memory closing a project does not release all memory Jan 5, 2018
@ddennedy
Copy link
Member

ddennedy commented Jan 5, 2018

It does release memory, but not 100%. Here is what I found on 64-bit Windows 10 loading a small single track timeline project and measured simply using Task Manager. Loading the project and playing it through consumes 217.6 MB. Subsequent reloading and playing it consumed an additional 28 - 40 MB each time. On average, roughly 15% of memory was leaked upon reloading and playing the project.

I admit this is a bug, but I am not going to work on it right at this moment, and I do not have much advice to offer at this time. I think the "many variables were static local variables" are singletons, which are not reconstructed by design and unrelated to the problem. More than likely, some references to MLT objects are not being released. When I say "reference" I mean that logically, not literally a C++ reference. MLT is a reference-counted C framework. Its C++ wrapper uses constructors and destructors to increment and decrement the reference count. It may be that Shotcut is not deleting some pointers to MLT objects. It may be that some MLT objects are not releasing references to other MLT objects.

@ddennedy
Copy link
Member

ddennedy commented Jan 8, 2018

See also in MLT mltframework/mlt#271

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants