Memory allocation: Difference between revisions

no edit summary
m (Added omit from R tag)
No edit summary
Line 665:
* Using [[:Category:SWIG|SWIG]] or [[:Category:critcl|critcl]] to write a bridge to a standard [[C]] allocator.
 
=={{omit fromheader|R}}==
<lang R>
x=numeric(10) # allocate a numeric vector of size 10 to x
rm(x) # remove x
 
x=vector("list",10) #allocate a list of length 10
x=vector("numeric",10) #same as x=numeric(10), space allocated to list vector above now freed
rm(x) # remove x
 
</lang>
 
 
 
{{omit from|Ruby}}
Anonymous user