-
Notifications
You must be signed in to change notification settings - Fork 214
Don't dealloc strings if the TensorBuffer is shared (#357) #358
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
Conversation
There's no more straightforward way to get the information? It doesn't sound like TF_TensorMaybeMove() is always going to return null when the content is being shared. |
If there is, I haven't found it. BTW, what I really wonder is: Shouldn't string deallocation be done automatically on the native Tensorflow level when the last tensor that uses the TensorBuffer is released? |
No, that doesn't happen. We need to allocate the strings manually, and deallocate them manually or we end up with memory leaks, see issue #251. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, it looks like the modified code is not formatted correctly, @brychcy can you please run |
Done. At first it didn't do anything for me because origin/master pointed to my version and As the whole file was reformatted, I have done it in a separate commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot @brychcy for fixing this!
No description provided.