Skip to content

Conversation

@BastiaanOlij
Copy link
Collaborator

Our Object wrapper class needs to have a virtual destructor to make sure the correct destructor is called when destructing classes. As a bonus this also ensure that there is no shift in pointers when virtual methods are added later as our Object class now already has a v-table.

@BastiaanOlij BastiaanOlij added the bug Something isn't working label Sep 21, 2021
@BastiaanOlij BastiaanOlij requested a review from vnen September 21, 2021 14:42
@BastiaanOlij BastiaanOlij self-assigned this Sep 21, 2021
@BastiaanOlij BastiaanOlij merged commit bcd7a15 into vnen:gdnative-extensions Sep 22, 2021
@BastiaanOlij BastiaanOlij deleted the add_virtual_destructor branch September 22, 2021 01:07
@vnen
Copy link
Owner

vnen commented Sep 23, 2021

Using = default would be better indeed, it can be used by the compiler for optimizations.

@Shatur Shatur mentioned this pull request Sep 25, 2021
@Shatur
Copy link

Shatur commented Sep 25, 2021

Using = default would be better indeed, it can be used by the compiler for optimizations.

Opened #34.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants