You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2021/07/01 03:54:11 UTC

[GitHub] [incubator-brpc] lorinlee commented on issue #1449: bthread: bthread_setspecific may cause memory leak

lorinlee commented on issue #1449:
URL: https://github.com/apache/incubator-brpc/issues/1449#issuecomment-871893605


   @cdjingit There are some differences, the code comments just explain that memory leaks may occur if borrowing KeyTable in `bthread_setspecific`, so `bthread_setspecific` creates a new one KeyTable instead of borrowing, but this implementation needs special usage. For example, we must call bthread_getspecific before bthread_setspecific, otherwise infinite KeyTables will be created, which causes KeyTables memory to leak.


-- 
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: dev-unsubscribe@brpc.apache.org

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org