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

How to clear the memory occupied by the browser? #406

Open
abluobo opened this issue Feb 1, 2023 · 10 comments
Open

How to clear the memory occupied by the browser? #406

abluobo opened this issue Feb 1, 2023 · 10 comments

Comments

@abluobo
Copy link

abluobo commented Feb 1, 2023

I'm using the latest version of Cornerstone 3D for a project and I have a viewer component that uses it, I'm trying to clear memory when I unmount the component, here's the beforeDestroy function I use:

beforeDestroy() {
    cornerstoneTools.destroy()
    RenderingEngine.destroy()
    this.renderingEngine.destroy()
  },

However, there are still a large number of memory leaks, even if this function is run when the component is unloaded

Is it wrong to use the way of clearing memory? How to clear memory in the right way?

@sedghi
Copy link
Member

sedghi commented Feb 1, 2023

maybe clear the cache as well? cornerstone.cache.purge

@abluobo
Copy link
Author

abluobo commented Feb 2, 2023

maybe clear the cache as well? cornerstone.cache.purge

I used the purgeCache() method, but it didn't work

Viewed through the task manager, the memory occupied by Google Browser has not decreased significantly after uninstalling the interface components

@sedghi
Copy link
Member

sedghi commented Feb 2, 2023

Can you do a memory profiling and send the results here? I recorded myself in the past for how to profile (maybe you already know it)

https://www.dropbox.com/s/cesszo1figlceuc/2022-10-06%2015-47-40%20%281%29.mp4?dl=0

@abluobo
Copy link
Author

abluobo commented Feb 3, 2023

Can you do a memory profiling and send the results here? I recorded myself in the past for how to profile (maybe you already know it)

https://www.dropbox.com/s/cesszo1figlceuc/2022-10-06%2015-47-40%20%281%29.mp4?dl=0

I made a memory profiling with reference to the operation process of the video, and the following is the results

image
image
image
image
image

@sedghi
Copy link
Member

sedghi commented Feb 3, 2023

What is your OS and processor?

@abluobo
Copy link
Author

abluobo commented Feb 3, 2023

OS : Windows 10
Processor: Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz 3.60 GHz

@sedghi
Copy link
Member

sedghi commented Feb 3, 2023

Can you please help me debug this?
See here, can you make the same recording starting from before load, load, clean up, along with all the memory graphs.

Thanks!

@abluobo
Copy link
Author

abluobo commented Feb 6, 2023

Can you please help me debug this? See here, can you make the same recording starting from before load, load, clean up, along with all the memory graphs.

Thanks!

20230206111002.2.mp4

In my project, the prefix of imageId is 'wadouri:' rather than 'streaming-wadors:' or 'wadors:', This is where I can think of different places.

@sedghi
Copy link
Member

sedghi commented Feb 16, 2023

So update:
This is a issue for Intel integrated graphic cards and does not relate to our libraries (seems like)
Can you make sure your driver is up to date (31.xxxx)

@sedghi
Copy link
Member

sedghi commented Oct 13, 2023

#453

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

2 participants