TurboScript icon indicating copy to clipboard operation
TurboScript copied to clipboard

'object = null' instead 'delete object' for deallocation

Open MaxGraey opened this issue 7 years ago • 6 comments

object = null is standard way to signalize for GC to forcing delete object by reference in js.

MaxGraey avatar Mar 28 '17 10:03 MaxGraey

Thats a cool idea. 👍

nidin avatar Mar 28 '17 13:03 nidin

What is the philosophy for memory management?

My opinion is to keep things simple and only support manual memory management initially (i.e. malloc/free) and if a module doesn't do any malloc/free operations there would be no cost to the module.

winksaville avatar Apr 12 '17 14:04 winksaville

Same philosophy here. MVP only support manual memory management. There is another possible optimization, we can auto free allocated memory if it's not referencing outside of a function and the instance is a local variable.

On Wed 12. Apr 2017 at 4:18 PM, Wink Saville [email protected] wrote:

What is the philosophy for memory management?

My opinion is to keep things simple and only support manual memory management initially (i.e. malloc/free) and if a module doesn't do any malloc/free operations there would be no cost to the module.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/01alchemist/TurboScript/issues/22#issuecomment-293591613, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMGZud4HuiQlfOVYko0RyUp_iH3oNy2ks5rvN0sgaJpZM4MrbFx .

nidin avatar Apr 12 '17 14:04 nidin

Has there been any progress in this direction? Unfortunately I'm not too good at parser stuffs, but I think it should not be too difficult

MaxGraey avatar Apr 19 '17 19:04 MaxGraey

It is doable. I will try it next week.

nidin avatar Apr 19 '17 19:04 nidin

Great!

MaxGraey avatar Apr 19 '17 20:04 MaxGraey