Skip to content

Memory leak in vertex_buffer.h #39

Description

@wediaklup

In VertexBuffer constructor a vertex array object and a buffer are created (Ln. 8/Ln. 11) but the destructor only frees the buffer but not the vao.

glGenVertexArrays(1, &vao);

glGenBuffers(1, &bufferId);

virtual ~VertexBuffer() {
glDeleteBuffers(1, &bufferId);
}

Inserting glDeleteVertexArrays(1, &vao); into the destructors code solved the problem for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions