A
Andre
if I have an unsafe method that takes in two arrays, performs some
operations and returns; I know that the garbage collector will not
collect objects allocated inside the unsafe method. However, if I'm
calling this method from a main() method of a class which is safe (i.e
managed), will the allocated array (which, suppose, has been allocated
inside the main() method) be collected by the garbage collector after
it's been used? Also, how do we delete heap allocated objects (suppose a
temporary array) from within the unsafe method? Is the unsafe method
treated as a region (term taken from strict Realitime environment) and
discarded by the GC once it's been used (or is it the method stack
that's discarded)? Just making sure I know what my code does before I
implement it thanks
-Andre
operations and returns; I know that the garbage collector will not
collect objects allocated inside the unsafe method. However, if I'm
calling this method from a main() method of a class which is safe (i.e
managed), will the allocated array (which, suppose, has been allocated
inside the main() method) be collected by the garbage collector after
it's been used? Also, how do we delete heap allocated objects (suppose a
temporary array) from within the unsafe method? Is the unsafe method
treated as a region (term taken from strict Realitime environment) and
discarded by the GC once it's been used (or is it the method stack
that's discarded)? Just making sure I know what my code does before I
implement it thanks
-Andre