Commit 42f6e99c authored by Andrii Grynenko's avatar Andrii Grynenko Committed by Facebook Github Bot

Fix Fiber::LocalData leak for large fiber locals

Summary: facepaw

Reviewed By: yfeldblum

Differential Revision: D4856227

fbshipit-source-id: 17a73d4d630c6efe1763bbd8aff8b7a2c7721c27
parent 4fe88e4c
...@@ -189,6 +189,10 @@ void Fiber::preempt(State state) { ...@@ -189,6 +189,10 @@ void Fiber::preempt(State state) {
} }
} }
Fiber::LocalData::~LocalData() {
reset();
}
Fiber::LocalData::LocalData(const LocalData& other) : data_(nullptr) { Fiber::LocalData::LocalData(const LocalData& other) : data_(nullptr) {
*this = other; *this = other;
} }
......
...@@ -131,6 +131,7 @@ class Fiber { ...@@ -131,6 +131,7 @@ class Fiber {
class LocalData { class LocalData {
public: public:
LocalData() {} LocalData() {}
~LocalData();
LocalData(const LocalData& other); LocalData(const LocalData& other);
LocalData& operator=(const LocalData& other); LocalData& operator=(const LocalData& other);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment