Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Conversation

@havard
Copy link

@havard havard commented Mar 1, 2015

Issue #505 identified several cases of resource starvation. This commit fixes leaking NpgsqlBaseStream instances.

roji added a commit that referenced this pull request Mar 2, 2015
Leak removal: Set BaseStream to null when closing connections.
@roji roji merged commit 124adeb into npgsql:2.2 Mar 2, 2015
@roji roji added the bug label Mar 2, 2015
@roji roji added this to the 2.2.5 milestone Mar 2, 2015
@roji
Copy link
Member

roji commented Mar 2, 2015

Thanks for this, once again. I have forward-ported this to master as well.

A bit out of curiosity: did you actually experience a leak because of this? If so, I'm wondering if it is the result of the cyclical references (between NpgsqlConnector and NpgsqlNetworkStream), or if NpgsqlConnector was still being referenced after being closed (e.g. by the pool).

If it's the latter then we probably have another leak somewhere, if it's a matter of cyclical references I was under the impression that the garbage collector knows how to deal with this kind of case...

@havard
Copy link
Author

havard commented Mar 2, 2015

This was also found in the same analysis I posted earlier, so yes, it is very likely a result of the cyclic references discussed in #505.

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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.