Skip to content

release() does not need to be virtual#5594

Merged
soumith merged 1 commit intopytorch:masterfrom
colesbury:release
Mar 7, 2018
Merged

release() does not need to be virtual#5594
soumith merged 1 commit intopytorch:masterfrom
colesbury:release

Conversation

@colesbury
Copy link
Copy Markdown
Member

Only the destructor ~Retainable() needs to be virtual.

Only the destructor `~Retainable()` needs to be virtual.
@goldsborough
Copy link
Copy Markdown
Contributor

Does this have to do with the VariableType::ID() issue?

@colesbury
Copy link
Copy Markdown
Member Author

No, it just marginally speeds up things by a few ns

@colesbury
Copy link
Copy Markdown
Member Author

@pytorchbot retest this please

2 similar comments
@ezyang
Copy link
Copy Markdown
Contributor

ezyang commented Mar 6, 2018

@pytorchbot retest this please

@ezyang
Copy link
Copy Markdown
Contributor

ezyang commented Mar 6, 2018

@pytorchbot retest this please

@soumith soumith merged commit 63b4694 into pytorch:master Mar 7, 2018
@colesbury colesbury deleted the release branch March 9, 2018 18:24
laurentdupin pushed a commit to laurentdupin/pytorch that referenced this pull request Apr 24, 2026
Only the destructor `~Retainable()` needs to be virtual.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants