You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/07/22 09:36:45 UTC

[GitHub] [incubator-doris] vagetablechicken edited a comment on pull request #4135: [MemTracker] make all MemTrackers shared

vagetablechicken edited a comment on pull request #4135:
URL: https://github.com/apache/incubator-doris/pull/4135#issuecomment-662351521


   > Hello, I have two questions to ask。
   > 
   > 1. shared ptr use for avoid memory leaks. but at the same time, it brings about several problems:
   >    (1)There are additional costs of ref count of ptr
   >    (2)  The interface becomes infectious
   >    So Is it good enough to do this replacement of shared_ptr ? what benefit us?
   > 2. `unique_ptr` runtime expenses is close to the raw pointer and it's simple enough to use。
   >    In most cases, should we replacing it with `shared_prt`.
   
   As metioned in the first comment, this pr is for showing all MemTracker on BE's website #3714 , like kudu. So we need to make all  MemTrackers not owned by anyone. If we get it `on web`, it shouldn't be destoryed with the obj which created it. 


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org