How to release reference explicitly for garbage co...
# getting-started
t
How to release reference explicitly for garbage collection / memory leak prevention purposes, like
context = null
, for Non-Nullable types? Is it impossible?
k
Why do you need this? We usually trust the garbage collector to do all of this automatically.
There's some stuff in
sun.misc.Unsafe
but you shouldn't really use that unless you're interacting with native libraries.