When does a finished async task release its RAM? #14286
Replies: 3 comments
-
Give this a test:
|
Beta Was this translation helpful? Give feedback.
-
A Your code should be safe. |
Beta Was this translation helpful? Give feedback.
-
An alternative way of coding this, perhaps more in tune with the Zen of realtime programming, is to use a queue to link the producer and consumer. Something like:
Assumes that |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have an async task that I need to run repeatedly, but only one instance of it will ever be running at one time. I want to make sure that when the task is finished (either because it finished by itself, or was cancelled), it deallocates any RAM it was using, so that I don't end up running out of RAM.
My code is roughly:
Does awaiting the task object after it's done/cancelled release any RAM the task was using?
Beta Was this translation helpful? Give feedback.
All reactions