Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Memory leak of Texture2dProgram #116

@yanqinglu

Description

@yanqinglu

Seems there are memory leask in Texture2dProgram::Release(). Should delete shaders that have been attached:

if (mProgramHandle > 0) {
int[] ret = new int[1];
GLES20.glGetProgramiv(mProgramHandle, GLES20.GL_ATTACHED_SHADERS, ret, 0);

        int count = ret[0];
        if (count > 0) {
            int[] shaders = new int[count];
            GLES20.glGetAttachedShaders(mProgramHandle, count, ret, 0, shaders, 0);
            for (int shader : shaders) {
                GLES20.glDeleteShader(shader);
            }
        }
    }

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