Memory allocation: Difference between revisions
m
no edit summary
No edit summary |
mNo edit summary |
||
Line 764:
When run using Sun's JVM implementation, the above simply outputs "created". Therefore, you cannot rely on <tt>finalize</tt> for cleanup.
=={{header|Julia}}==
Julia has memory management. Objects are freed from memory automatically. Because vectors and matrices, unlike lists, can have fixed size allocations in memory, these can be allocated implicitly with a call to a function returning a vector, or explicitly by assigning the memory to a variable:
<lang julia>
matrix = Array{Float,2}(100,100)
matrix[31,42] = pi
</lang>
=={{header|Kotlin}}==
|