How do you deallocate used memory? #70
Unanswered
NullSoldier
asked this question in
Q&A
Replies: 2 comments
-
try waiting for the canvas to go out of scope and GCed. |
Beta Was this translation helpful? Give feedback.
0 replies
-
In addition to @takase1121's point about how scope & GC interact, you should also keep in mind that the number that will fluctuate due to the objects your code creates are in the heap column. The RSS value is more of a high-water-mark than something that grows & shrinks since it is also measuring all the shared library code that gets mapped in, etc. If you print out the totals in kilobytes instead of megs, you'll see that there actually is some reclaiming of heap space going on:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Creating and rendering an image seems to allocate memory, but there's no obvious way to deallocate it. Clearing references to the canvas do nothing. Setting width / height to 0 do nothing. The memory is still allocated.
Beta Was this translation helpful? Give feedback.
All reactions