Skip to content
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

Fix memory leak in cx:eval #256

Closed
wants to merge 1 commit into from
Closed

Fix memory leak in cx:eval #256

wants to merge 1 commit into from

Conversation

@bertfrees
Copy link

@bertfrees bertfrees commented Apr 11, 2017

Currently the XProcRuntime instances in XProcRegistry aren't always cleaned up properly when cx:eval is used. It's the same issue that I reported a while ago in #82 (comment).

This PR is the quick fix, however it seems to me that the real problem lies within XProcRegistry. I guess I just don't see what this class does. From what I can tell, you could just as well store the XProcRuntime directly inside the XProcExtensionFunctionDefinition. I think I have to agree with what @jwcranford said in #152 (comment). This patch from @rdeltour from back in 2011 still seems relevant indeed.

For reference: these are all the previous issues and commits I could find about this topic, in chronological order:

@bertfrees bertfrees mentioned this pull request Apr 11, 2017
2 of 3 tasks complete
@ndw
Copy link
Owner

@ndw ndw commented Apr 14, 2017

Right. I'll try to give this a comprehensive review this weekend.

@ndw
Copy link
Owner

@ndw ndw commented Aug 12, 2017

Storing the XProcRuntime in the extension sometimes lead to the wrong context being present in the evaluation of the extension function. I can't recall exactly how, just at the moment.

I concede there's room for improvement here. In the short term, I'm going to merge your fix.

@ndw ndw closed this in 70c482c Aug 12, 2017
ndw added a commit that referenced this pull request Aug 12, 2017
ndw added a commit that referenced this pull request Aug 12, 2017
@bertfrees
Copy link
Author

@bertfrees bertfrees commented Aug 12, 2017

Great.

@bertfrees bertfrees deleted the daisy:memory-leak branch Aug 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants