Skip to content

Disallow stack-allocated meshes #610

@mtao

Description

@mtao

Every mesh should be initialized using a shared_ptr, as some datastructures (namely certain Attribute Handles) . This means that we need

  • a static member function called create that constructs a std::shared_ptr<Mesh> (or for derive classes whatever dreived type).
  • all constructors should be made private and friended with make_shared
  • make the this can be checked by checking assert(bool(shared_from_this()));

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions