Modules.nas: Difference between revisions

m
Line 92: Line 92:
If you want the module to be re-/un-loadable, you must make sure to track resources and remove them on onload.
If you want the module to be re-/un-loadable, you must make sure to track resources and remove them on onload.
For this the main.nas shall contain a function {{code|unload()}} that removes any resources which were created by the module.
For this the main.nas shall contain a function {{code|unload()}} that removes any resources which were created by the module.
'''Example:''' any canvas created by the module should have called its {{code|del()}} method here.
'''Example:''' any canvas created by the module should have called its {{code|del()}} method here.


250

edits