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

Memory waste on image canvas #22

Open
4inn opened this issue Nov 7, 2014 · 3 comments
Open

Memory waste on image canvas #22

4inn opened this issue Nov 7, 2014 · 3 comments

Comments

@4inn
Copy link

4inn commented Nov 7, 2014

Dear Luis, I am using your library Node-OpenVG-Canvas . When loading images in sequential order, so the canvas image source function causes the free memory begins to decrease and it is not released ...

Try through the methods of .vgDestroy but while the image is deleted, the memory allocated to it is not released ...

Is there another way to release it ?

Thank you,

(Sorry for my bad english)

@T4d3o
Copy link

T4d3o commented Nov 15, 2014

Hello. Not a software problem I think.
The small memory of rpi is the cause. I've solved using: global.gc();
You need to add the parameter: --expose-gc
Like: node-canvas --expose-gc examples/swissClock.js

Do not know if it's the best solution, but I have solved my problem.
(Sorry for my bad english too)

@4inn
Copy link
Author

4inn commented Nov 16, 2014

Thank you very much for the reply. You're right in that little memory of raspberry is a problem, but there comes a part of this challenge ... I've done several tests and find that when creating image objects , loading the source , then to destroy the object or load another image, the memory is still used or consumed by the resource without being released by this resource. Anyway I will continue doing tests and we stay in touch .

You done a very good job with this library to work with the raspberry !

regards

@eendeego
Copy link
Owner

Hi @4inn, thank you for the kind words and sorry for taking so long to get back. I can't at this time investigate much more on this issue.

If you are calling vgDestroy, the image buffer on the GPU should be getting released. Otherwise it seems that you may have some kind of memory leak.

Can you post some minimum code where you see this happening ?

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

No branches or pull requests

3 participants