2,561
edits
Line 206: | Line 206: | ||
= Things to avoid = | = Things to avoid = | ||
And just for completeness: things get *really* complicated if you need to *store* a naRef you got from a Nasal script in a place where the interpreter can't see it. | And just for completeness: things get *really* complicated if you need to *store* a naRef you got from a Nasal script in a place where the interpreter can't see it. | ||
There is a minimal API to handle this: | |||
// "Save" this object in the context, preventing it (and objects | |||
// referenced by it) from being garbage collected. | |||
void naSave(naContext ctx, naRef obj); | |||
But this API doesn't yet have a corresponding call to release a saved object. | |||
Just don't do this, basically. Always keep your Nasal data in Nasal space. | |||
[[Category:Nasal]] | [[Category:Nasal]] | ||
[[Category:Core Documentation]] | [[Category:Core Documentation]] |
edits