gltext icon indicating copy to clipboard operation
gltext copied to clipboard

Fix memory leaks in draw and cacheCharacters functions.

Open andyschwarzl opened this issue 11 years ago • 7 comments

andyschwarzl avatar Jan 21 '15 11:01 andyschwarzl

Hello, I'm asking you for help with gltext. It seems that your memory leak fix is not enough for me.

jastrebok avatar Mar 07 '15 08:03 jastrebok

Hello. The fix might not be complete since I only considered these two functions, which has been fine for me. Try to use valgrind and find any missing memory/buffer releases. HTH

andyschwarzl avatar Mar 09 '15 08:03 andyschwarzl

Hello,

I managed to get the thing working with only a minimal leak (unfortunately, something is still leaking) but I have a different problem. All characters that reach below baseline (like g,j,p,q,y or even Q) are not displayed using this library. Is it just in my case? I haven't tried to modify anything in the font construction.

Petr

---------- Původní zpráva ----------

Od: Andreas Schwarzl [email protected]

Komu: branan/gltext [email protected]

Datum: 9. 3. 2015 9:32:07

Předmět: Re: [gltext] Fix memory leaks in draw and cacheCharacters functions. (#9)

"

Hello. The fix might not be complete since I only considered these two functions, which has been fine for me. Try to use valgrind and find any missing memory/buffer releases. HTH

Reply to this email directly or view it on GitHub (https://github.com/branan/gltext/pull/9#issuecomment-77815942).

"=

jastrebok avatar Mar 26 '15 20:03 jastrebok

I noticed that the included version on Harbuzz is 0.7.0, have you linked against this code, or an updated version?

ColinGilbert avatar Mar 28 '15 00:03 ColinGilbert

I don't know which version I have, unfortunately. I cannot find it in the source files. Do you think that something changed in that respect?

I also noticed, that when the font is bigger, some other characters start to disappear as well, mostly letters or numbers with curves (like S).

---------- Původní zpráva ----------

Od: Colin Gilbert [email protected]

Komu: branan/gltext [email protected]

Datum: 28. 3. 2015 1:39:08

Předmět: Re: [gltext] Fix memory leaks in draw and cacheCharacters functions. (#9)

"

I noticed that the included version on Harbuzz is 0.7.0, have you linked against this code, or an updated version?

Reply to this email directly or view it on GitHub (https://github.com/branan/gltext/pull/9#issuecomment-87132496).

"=

jastrebok avatar Mar 28 '15 07:03 jastrebok

There is at the beginning of gltext.hpp a line

#define GLTEXT_CACHE_TEXTURE_SIZE 256

Try changing that value to 512, or even 1024, then tell me what happens. Quite curious to hear your results.

ColinGilbert avatar Mar 28 '15 07:03 ColinGilbert

Apparently, nothing changed. :(

---------- Původní zpráva ----------

Od: Colin Gilbert [email protected]

Komu: branan/gltext [email protected]

Datum: 28. 3. 2015 8:44:26

Předmět: Re: [gltext] Fix memory leaks in draw and cacheCharacters functions. (#9)

"

There is at the begging of gltext.hpp a line

#define GLTEXT_CACHE_TEXTURE_SIZE 256

Try changing that value to 512, or even 1024, then tell me what happens. Quite curious to hear your results.

Reply to this email directly or view it on GitHub (https://github.com/branan/gltext/pull/9#issuecomment-87187930).

"=

jastrebok avatar Mar 28 '15 07:03 jastrebok