viirya commented on issue #1425:
URL: https://github.com/apache/arrow-rs/issues/1425#issuecomment-1065804199


   > * It breaks current API convention. Anyone use the API like me will be 
detected memory leak because of this change.
   > 
   > * You can say your Java program don't leak memory because you always 
holding the pointer, but in some aspect we can say it's, because we alloc two 
struct point to the same data, which can be easily and should managed in one.
   > 
   > * Allow clone will make us have the same issue mentioned by 
@jorgecarleitao , I add a demo here
   
   I don't know how do you use the API. If the memory leak is happened because 
you need to hold the pointer in Java side, I think we can mark the source 
structs released after cloning it. So you can free the struct in Java.
   
   The issue you demo is also resolvable by marking the source struct released.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to