HomePhabricator

gl: remove memory leak of orient_set

Authored by kimcinoo on Feb 13 2021, 3:51 AM.

Description

gl: remove memory leak of orient_set

Summary:
The tex->pt->references is descreased by
evas_gl_common_texture_free -> pt_unref

if tex->references is 0

And tex->pt->texture is removed by
evas_gl_common_texture_free -> pt_unref -> glDeleteTextures

if tex->pt->references is 0

The evas_gl_common_texture_free decreases tex->references only
if tex->references is bigger than 0. There is no chance to decrease
tex->pt->references at this point.

So if orient_set increases both references of tex and tex->pt, then
the tex->pt->reference is not decreased till tex->references is 0.

So do not increase tex->pt->references in eng_orient_set.

Reviewers: raster, cedric, Hermet

Subscribers: reviewers, committers

Tags: efl

Differential Revision: https://phab.enlightenment.org/D12243

Details

Committed
rasterFeb 13 2021, 3:51 AM
Differential Revision
D12243: gl: remove memory leak of orient_set
Parents
rEFLb3a1c400ac00: theme: Silence warning.
Branches
Unknown
Tags
Unknown