Memory allocation: Difference between revisions

Content deleted Content added
Expanded description of why Tcl considers this to be an omitted task; it's actually interesting from the perspective of the task.
add E example
Line 77:
==C++==
'''TODO:''' new and delete/delete[]
 
=={{header|E}}==
 
E is a memory-safe language and does not generally work with explicit deallocation. As in Python and Java, you can create arrays of specific data types which will, by any decent implementation, be compactly represented.
 
<lang e>? <elib:tables.makeFlexList>.fromType(<type:java.lang.Byte>, 128)
# value: [].diverge()</lang>
The above creates an array with an initial capacity of 128 bytes (1 kilobit) of storage (though it does not have any elements). (The Java type name is left-over from E's Java-scripting history and will eventually be deprecated in favor of a more appropriate name.) The array will be deallocated when there are no references to it.
 
=={{header|Forth}}==