Skip to content

Conversation

@sayantan-nervana
Copy link
Contributor

@sayantan-nervana sayantan-nervana commented Jul 18, 2019

The bridge holds on to executable in 4 places. When release backend is called, backend releases its shared ptr to executables, and then releases backend. But that doesn't destruct the executable since the bridge is still holding on the the shared pointers.

Hence clearing the maps to make sure when release backend call is made, the backend's shared ptr to executable has use_count()==1

@sayantan-nervana sayantan-nervana added the wip Work in progress label Jul 18, 2019
@sayantan-nervana sayantan-nervana changed the title sarkars/Initial commit sarkars/destructor order Jul 18, 2019
Copy link
Contributor

@kanvi-nervana kanvi-nervana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: add a comment about the need for this change
otherwise LGTM

@sayantan-nervana sayantan-nervana added release candidate and removed wip Work in progress labels Jul 25, 2019
@sayantan-nervana sayantan-nervana merged commit 65348d7 into master Jul 25, 2019
@sayantan-nervana sayantan-nervana deleted the sarkars/destructor_order branch July 25, 2019 22:05
gopoka pushed a commit that referenced this pull request Oct 28, 2019
Free all executables before calling ReleaseBackend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants