fix mem leak
authorAlecs King <int@fb.com>
Wed, 3 Jun 2015 00:04:25 +0000 (17:04 -0700)
committerNoam Lerner <noamler@fb.com>
Wed, 3 Jun 2015 16:55:12 +0000 (09:55 -0700)
commit79ae78317bb26ac56fa2feeeb0292935f36c85a5
tree29f58f06151b8bd7d64dd9798857adca1ef0271b
parent789dbd170fb1d61e9720a057f146f86ec908186c
fix mem leak

Summary:
- use folly::ThreadLocal to work around GCC bug 57914 (with the benefit of accessAllThreads)
- clean up corresponding thread-local and global cache entries before eventbase gets destructed since there was a possible memory leak for short-term living eventbase.

Test Plan:
tests

Reviewed By: andrii@fb.com

Subscribers: smarlow, rushix, ilyam, trunkagent, folly-diffs@, yfeldblum, chalfant, jinfu

FB internal diff: D2116216

Tasks: 72910287279391

Signature: t1:2116216:1433212893:e57a7df90b15b89ccd9471469e669c6e7dc477bf

Blame Revision: D1941662
folly/experimental/fibers/FiberManagerMap.cpp
folly/io/async/EventBase.cpp
folly/io/async/EventBase.h