Skip to content

Destructor is not called on STL container elements #668

Open

Description

@lucic71

End of scope, delete, vector::pop_back, vector::clear, map::erase, unique_ptr::reset, etc, all run the destructor of the elements in C++.

Our Rust translation does not run the destructor of the elements.

Activity

  1. lucic71 commented on Nov 21, 2026

    @lucic71
    ContributorAuthor

    Also destructors do not run for the STL types themselves, we need rules for the STL destructors.

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

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