Page MenuHomePhabricator

gl: remove memory leak of orient_set
ClosedPublic

Authored by kimcinoo on Thu, Feb 4, 10:42 PM.

Details

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.

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kimcinoo created this revision.Thu, Feb 4, 10:42 PM
kimcinoo requested review of this revision.Thu, Feb 4, 10:42 PM
raster accepted this revision.Sat, Feb 13, 3:55 AM
This revision is now accepted and ready to land.Sat, Feb 13, 3:55 AM

done. sorry. busy with a house move... :)

This revision was automatically updated to reflect the committed changes.

done. sorry. busy with a house move... :)

Thank you.
You moved to new house?!!!
We had lunar new year's holidays.

Yes - had to move. LAndlord selling current place. So have spent now 2 weeks packing and now unpacking... :)