View Single Post
05/13/14, 07:39 AM   #15
ingeniousclown
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 122
Originally Posted by CatoTheElder View Post
I love how when I show someone how to do things they thought impossible, and include examples and reference links, you blindly state not to. I wish I could give you a gold star for your helpfulness.

--
Sorry I didn't explicitly state it (although it is in the manual I linked), but all references to data must be dereferenced before the memory is freed.
Why would you assume he thought it impossible? Why would you assume that what he wanted to do was to free the memory? I mean, seeing that he wants to set stuff to nil would lead to a pretty good guess, but...

Aaaalso your link and examples do not explain nor state anywhere that the garbage collector SHOULD be run manually, only that it CAN. And just because you can do something, does not mean you should. Forcing the GC to run in any programming is an optimization technique that should be avoided unless it can't. In the world of add-on development, I can't think of any case in which the GC would ever NEED to be run, except in the most ridiculously complicated add-ons (which itself might have its own issues).

*also, Wobin is awesome.
  Reply With Quote