Skip to content

Fixed few memory leaks#42

Closed
miktam wants to merge 2 commits into
joeferner:masterfrom
miktam:bug/memory_leak
Closed

Fixed few memory leaks#42
miktam wants to merge 2 commits into
joeferner:masterfrom
miktam:bug/memory_leak

Conversation

@miktam

@miktam miktam commented May 23, 2013

Copy link
Copy Markdown
Contributor

Fixed few memory leaks mentioned here:
#40

@flyth

flyth commented May 28, 2013

Copy link
Copy Markdown
Contributor

Thanks for those fixes! One problem, though:
VALUE_TYPE_BLOB and OutParam::OCCIBLOB actually get freed by a callback that is passed to node (see "RandomBytesFree") and shouldn't be freed manually - otherwise you might get weird stuff written to that memory :)

@flyth

flyth commented May 29, 2013

Copy link
Copy Markdown
Contributor

I tested a little further and still got a pretty huge amount of memory "leaking". However:
If I add a new scope like

void Connection::EIO_AfterExecute(uv_work_t* req, int status) {
    HandleScope scope;

to that EIO_AfterExecute, all memory is getting freed. I'm still at the beginning of getting to know how this all works, but as it seems the scope that was used before was that of the connection (rather than the execute)...

I guess I'll have to read a little further...

@miktam

miktam commented May 29, 2013

Copy link
Copy Markdown
Contributor Author

flyth, thank you for your valuable input, I addressed it in a last pull request.
HandleScope is exactly what we need here: http://bespin.cz/~ondras/html/classv8_1_1HandleScope.html

@miktam miktam closed this May 29, 2013
@miktam

miktam commented May 29, 2013

Copy link
Copy Markdown
Contributor Author

Closed, as it is fixed here: #45

@flyth flyth mentioned this pull request Sep 17, 2014
davidvitora pushed a commit to davidvitora/contarejavamod that referenced this pull request Aug 23, 2019
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