Difference between revisions of "Object:release"

m
m
Line 4: Line 4:
 
This method can be used to immediately clean up large resources without waiting for Lua's garbage collector.
 
This method can be used to immediately clean up large resources without waiting for Lua's garbage collector.
  
{{notice|After this method has been called, attempting to call any other method on the object or using the object as an argument to another LÖVE API will cause an error.}}
+
{{notice|After this method has been called, attempting to call any other method on the object or using the object as an argument in another LÖVE API will cause an error.}}
 
== Function ==
 
== Function ==
 
=== Synopsis ===
 
=== Synopsis ===

Revision as of 01:40, 7 January 2018

Available since LÖVE 0.11.0
This function is not supported in earlier versions.

Destroys the Object's Lua reference. The object will be completely deleted if it's not referenced by any other LÖVE object or thread.

This method can be used to immediately clean up large resources without waiting for Lua's garbage collector.

O.png After this method has been called, attempting to call any other method on the object or using the object as an argument in another LÖVE API will cause an error.  


Function

Synopsis

success = Object:release( )

Arguments

None.

Returns

boolean success
True if the object was released by this call, false if it had been previously released.

See Also

Other Languages