Q
Q
Quad_Tree2015-06-15 16:47:40
Java
Quad_Tree, 2015-06-15 16:47:40

How to delete an array?

How to remove a multidimensional array so that it does not take up RAM?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
Billy Milligan, 2015-06-15
@Quad_Tree

This should be done by the garbage collector.
And to help him, you can do this:
array = null;

E
Evgeny Svirsky, 2015-06-15
@e_svirsky

unset($array)

N
Nikolai Pavlov, 2015-06-16
@gurinderu

Show your code. Most likely the algorithm is not correct. If, nevertheless, without creating an array, you can’t go anywhere and if you don’t need a guarantee of the safety of this data, then use weak reference. GC will crash them immediately at the first start.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question