KhronosGroup / KhronosGroup/COLLADA2GLTF

GLTF::Object should have a virtual destructor?

Open
#224 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
573
Forks
154
PR merge metrics
No merged PRs in 30d

Description

It is a common C++ design practice to always make destructors of base classes virtual, so that deleting a pointer to a base instance will call the derived constructor.

Do you guys agree? Then I'll make a patch request.

This would make fixing memory leaks in Maya2glTF easier by just keeping a vector of ``

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the declaration and uses of GLTF::Object, then inspect how derived objects are created and deleted in the converter and Maya2glTF. Confirm the ownership paths and project conventions before deciding whether a virtual destructor is appropriate; done means the design is agreed and the relevant deletion behavior is covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.