Skip to content

Commit

Permalink
Fix memory leak in containers
Browse files Browse the repository at this point in the history
Reviewed By: kassens, JacksonGL

Differential Revision: D29659925

fbshipit-source-id: 7af80a0ccb3c8cda1882e1a4c1a28e5f63b8bedd
  • Loading branch information
Juan Tejada authored and facebook-github-bot committed Jul 14, 2021
1 parent fa3c82f commit 5a0c4c6
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,14 @@ class RelayModernFragmentSpecResolver implements FragmentSpecResolver {
this._context = context;
this._data = {};
this._fragments = fragments;
this._inputProps = props;
this._props = {};
this._resolvers = {};
this._stale = false;
this._rootIsQueryRenderer = rootIsQueryRenderer;
this._inputProps =
RelayFeatureFlags.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT === true
? props
: {};

this.setProps(props);
}
Expand Down Expand Up @@ -148,8 +151,10 @@ class RelayModernFragmentSpecResolver implements FragmentSpecResolver {
}

setProps(props: Props): void {
if (RelayFeatureFlags.ENABLE_CONTAINERS_SUBSCRIBE_ON_COMMIT === true) {
this._inputProps = props;
}
this._props = {};
this._inputProps = props;
const ownedSelectors = getSelectorsFromObject(this._fragments, props);

for (const key in ownedSelectors) {
Expand Down

0 comments on commit 5a0c4c6

Please sign in to comment.