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

Possible memory leak in index/store/forestdb/iterator.go #194

Closed
tleyden opened this issue Apr 24, 2015 · 2 comments
Closed

Possible memory leak in index/store/forestdb/iterator.go #194

tleyden opened this issue Apr 24, 2015 · 2 comments
Labels

Comments

@tleyden
Copy link
Contributor

tleyden commented Apr 24, 2015

I've recently discovered that if a doc returned from calling iterator.Get() is not explicitly closed, it can result in memory leak -- see google groups thread

Reading over the code in index/store/forestdb/iterator.go, it's not obvious to me that this resource leak is avoided, since there is never an explicit call to doc.Close(). From my observations, even if the reference to the Go wrapper doc is GC'd, the underlying cgo memory won't be released.

I haven't observed any bugs while using bleve, this was just from reading index/store/forestdb/iterator.go, so there's a good chance it's not really a bug.

@mschoch mschoch added the bug label Apr 24, 2015
@mschoch
Copy link
Member

mschoch commented Apr 24, 2015

Yes this looks like a bug.

@tleyden
Copy link
Contributor Author

tleyden commented Apr 24, 2015

Related (closed) issue for secondary indexing: https://issues.couchbase.com/browse/MB-14701

abhinavdangeti added a commit that referenced this issue Dec 7, 2023
Includes:
* 78d1df8 Abhi Dangeti | Beautify & Fix cmd line tooling output for vector content (#194)
* 6a57ac5 Abhi Dangeti | Graceful exit when min arguments not provided for vector (#193)
abhinavdangeti added a commit that referenced this issue Dec 7, 2023
Includes:
* 78d1df8 Abhi Dangeti | Beautify & Fix cmd line tooling output for
vector content (#194)
* 6a57ac5 Abhi Dangeti | Graceful exit when min arguments not provided
for vector (#193)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants