Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

[x86/Linux] Add virtual dtor for ArrayStubCache class#8339

Merged
jkotas merged 2 commits into
dotnet:masterfrom
parjong:fix/virtul_dtor
Nov 30, 2016
Merged

[x86/Linux] Add virtual dtor for ArrayStubCache class#8339
jkotas merged 2 commits into
dotnet:masterfrom
parjong:fix/virtul_dtor

Conversation

@parjong
Copy link
Copy Markdown

@parjong parjong commented Nov 29, 2016

Adds virtual destructor for ArrayStubCache class (and its super classes) to fix the following warning during x86/Linux build:

src/vm/array.cpp:1266:17: error: delete called on 'ArrayStubCache' that has virtual functions but non-virtual destructor [-Werror,-Wdelete-non-virtual-dtor]
                delete pArrayStubCache;
                ^

@parjong parjong changed the title [x86/Linux] Adds virtual dtor for ArrayStubCache class [x86/Linux] Add virtual dtor for ArrayStubCache class Nov 29, 2016
@parjong
Copy link
Copy Markdown
Author

parjong commented Nov 29, 2016

@dotnet-bot test Linux ARM Emulator Cross Debug Build please

Comment thread src/vm/array.cpp Outdated
StubLinker *psl);
virtual UINT Length(const BYTE *pRawStub);

virtual ~ArrayStubCache() = default;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is not needed since you've made the destructor of the base class virtual.

@parjong
Copy link
Copy Markdown
Author

parjong commented Nov 29, 2016

@dotnet-bot test Linux ARM Emulator Cross Debug Build please

@jkotas jkotas merged commit 89440da into dotnet:master Nov 30, 2016
@parjong parjong deleted the fix/virtul_dtor branch November 30, 2016 23:14
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
…#8339)

* Adds virtual dtor for ArrayStubCache class

* Remove unnecessary default destructor


Commit migrated from dotnet/coreclr@89440da
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants