somaticio / tensorflow.rb

tensorflow for ruby
BSD 3-Clause "New" or "Revised" License
827 stars 66 forks source link

Fix a memory leak in session.run #93

Closed AshtonO closed 7 years ago

AshtonO commented 7 years ago

Previously, there way to properly delete tensor objects and free the C++ memory that is allocated in TF_NewTensor_wrapper. This fix introduces a delete function to tensor objects as well as providing a proper deallocator function to the call to TF_NewTensor.

arafatkatze commented 7 years ago

@AshtonO If you still want to make a few changes and edits to this.
Then you can reopen and do that.
The merge will happen when you are cool with it and I will check it out myself.

Thanks

AshtonO commented 7 years ago

@Arafatk Sorry about the confusion, I wanted to review it internally with some other people before doing the official PR here. Re-opening it now as I believe it's ready to go. I'll be opening another one as well for fixing memory leaks in graph loading.