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
Add active Close method. #43
Comments
Having a close makes a lot of sense. Why do you make a new connection? You can also re-use the existing connection over and over again. |
Hi all, I stumbled upon the same question. Maybe it would be good to describe what "scope" driver.Client, driver.Database and driver.Collection belong to (if they are long living or short living objects). In my opinion that is not clearly described in the readme. |
Hi, any update on this issue? Because I'm using another library which depends on this driver. After doing some code-tracking, I believe if your arango client connection initialized by HTTP, there's no need to close the connection manually. Line 328 in 17278d3
If no one uses the same HTTP client, Golang utilizes the garbage collection to release the memory. Therefore, will there be other scenarios that require the explicit Close method?
|
Hi, it's a little bit late, however, I just check out your code again. Why did you do the query inside the for-loop instead of constructing your query params outside and batch get your information one time? If there are N objects in your |
Hi, I am a new user of ArangoDB driver, and I am surprised there is no a such method. |
I don't think is needed. Arango works via HTTP REST APIs, so in theory, there is no connection to close. A connection is closed when the request is ended |
In Golang you can close a Connection only on the HTTP response level ( |
There is no way to close a connection and it's resulting in memory leak
my 8gb RAM is filled within 1.5 minutes
I am doing something like this
for _,item := range SomeArray{
ic:=getCount(item)
}
func getCount(Item) (iCount int) {
}
There is no way to close the connection object in this function resulting in leak
The text was updated successfully, but these errors were encountered: