Ncleardev / NclearOS-2

Cosmos based Operating System with GUI.
https://ncleardev.github.io/NclearOS-2/
35 stars 8 forks source link

Changing wallpaper causes a memory leak #5

Closed amysthat closed 10 months ago

amysthat commented 11 months ago

Upon pressing "Change Wallpaper" on the settings app, it's possible to see that the used RAM goes up in the Process Manager or System Info. If you change wallpaper enough, the system locks. My best guess is the old wallpaper is not deloaded. Probably using Heap.Collect is enough.

Ncleardev commented 11 months ago

Changing the wallpaper involves several processes:

Unfortunately, these bitmap functions cause memory leaks. A call to Heap.Collect is already made during every GUI.Refresh. However, attempting to include Heap.Collect inside a loop for these functions results in system freezing.

In the next version I will consider adding an option to disable blur effects and also implementing a safety feature to prevent system freezing in case the blur effect operation exceeds available RAM.

amysthat commented 10 months ago

Oh, I did not know that. Is this issue a "considered resolved" then? It appears you had already acknowledged this.