Skip to content

memory leak valgrind report #575

Description

@merich777

Hi. There is a memory leak report from valgrind memcheck.

In file di.hpp (line 1605)
explicit scope(TInjector&& i) noexcept : injector_((injector*)new injector_impl{static_cast<TInjector&&>(i)}) {}

result of new (some complex class) was cast to injector*
And then in destructor injector is freeded.
But the type of injector is different to than complex object was created in new.
Can we use virtual destructor for base class of injector ?

Activity

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