Make release_resources non-const#10192
Closed
smessmer wants to merge 2 commits intopytorch:masterfrom
Closed
Conversation
ezyang
approved these changes
Aug 3, 2018
6e6271c to
9ca9c04
Compare
9ca9c04 to
5a73ecd
Compare
5a73ecd to
ff6df52
Compare
ff6df52 to
6290cf0
Compare
Summary: This is useful for C APIs where we want to give owning pointers to/from other languages. Differential Revision: D9121493 fbshipit-source-id: 315fdd73264a6cb1486f6496efc38e5c02c5248f
Summary: Pull Request resolved: pytorch#10192 - release_resources() method must be non-const because it modifies the object - for intrusive_ptr<const MyClass>, this needs to be const_cast :( Reviewed By: ezyang Differential Revision: D9143808 fbshipit-source-id: fa3004472411b454b9298a304378b33ac7b7645a
6290cf0 to
b22bb6a
Compare
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Aug 3, 2018
Summary: Pull Request resolved: pytorch/pytorch#10192 - release_resources() method must be non-const because it modifies the object - for intrusive_ptr<const MyClass>, this needs to be const_cast :( Reviewed By: ezyang Differential Revision: D9143808 fbshipit-source-id: 9203ff7a7ff3bec165931279371c6e75d4f0ca8c
goodlux
pushed a commit
to goodlux/pytorch
that referenced
this pull request
Aug 15, 2018
Summary: Pull Request resolved: pytorch#10192 - release_resources() method must be non-const because it modifies the object - for intrusive_ptr<const MyClass>, this needs to be const_cast :( Reviewed By: ezyang Differential Revision: D9143808 fbshipit-source-id: 9203ff7a7ff3bec165931279371c6e75d4f0ca8c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Differential Revision: D9143808