Skip to content

Deinitialize Node.js properly #62

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed

Conversation

luminosuslight
Copy link
Collaborator

Original Node: the HandleScope that contains all global objects was created on the stack in the Start() functions and destroyed when the scope of the Start() function was left

Before in Node Lib: the HandleScope was created as a static variable in the _CreateInitialEnvironment() function and destroyed only when the program exited

Idea: creating the HandleScope on the heap and delete it in Deinitialize()

Problem: HandleScopes can't be created on the heap

Workaround in this PR: adding a wrapper around the HandleScope, that can be created on the heap, and destroy this wrapper in Deinitialize()

@luminosuslight luminosuslight changed the base branch from style-fixes to node_lib February 5, 2018 14:29
@luminosuslight
Copy link
Collaborator Author

TODO: The deinitialize methods are not complete yet.

@Johannes-Schneider Johannes-Schneider changed the title Create HandleScope on heap and destruct it properly Deinitialize Node.js properly Feb 7, 2018
@luminosuslight luminosuslight changed the base branch from node_lib to merged_master February 7, 2018 14:36
@luminosuslight luminosuslight changed the base branch from merged_master to node_lib February 7, 2018 14:46
@Johannes-Schneider Johannes-Schneider changed the base branch from node_lib to dev February 12, 2018 08:26
@Johannes-Schneider Johannes-Schneider changed the base branch from dev to node_lib February 12, 2018 08:27
Johannes-Schneider pushed a commit that referenced this pull request Feb 12, 2018
@Johannes-Schneider
Copy link
Collaborator

Applied changes in #67

msoechting pushed a commit that referenced this pull request Feb 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants