Jump to content

FreeMaterial isn't working


Rick
 Share

Recommended Posts

Please do not add tags in the thread title.

 

Just set the variable to NULL and it will get cleaned up automagically. You can call collectgarbage() in Lua to force a cleanup after setting the variable:

http://www.lua.org/manual/5.1/manual.html#pdf-collectgarbage

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

So can I technically do that with all LE entities? Why have :Free() for other entities like meshes then?

 

Please do not add tags in the thread title.

 

Sorry I didn't see a Lua forum but other languages have one so thought I'd give it some more info in the generic forum.

Link to comment
Share on other sites

The other language subforums are closed for new topics. They'll be merged into the main programming forum soon.

 

Entities require manual freeing because they have too many linkages to ever be collected by the GC. I'm not a big fan of GC because of things like this.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...