Is ThrowIfCancellationRequested()
in Asynchronous Tasks leaks memory? Is there any way to stop a running task immediately which don't leaks memory? I want to use some process immediately and want to free memory.
Asked
Active
Viewed 60 times
0

leppie
- 115,091
- 17
- 196
- 297

Muhammad Irfan
- 31
- 4
-
See http://stackoverflow.com/a/14738990/1287352 for killing a task with thread.Abort() – Eric Jan 27 '15 at 05:48
-
2Why do you think `ThrowIfCancellationRequested` leaks memory? Show us your code – Yuval Itzchakov Jan 27 '15 at 05:56
-
This can't be done. NET does not have a way to safely kill a thread. Abort() is unusable. – usr Jan 27 '15 at 09:25