Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » [FIXED] Memory leak in FreeType.
[FIXED] Memory leak in FreeType. [message #40001] Fri, 24 May 2013 23:15 Go to next message
Klugier is currently offline  Klugier
Messages: 1076
Registered: September 2012
Location: Poland, Kraków
Senior Contributor
Hello,

I have found memory leak in FreeType code. What's wrong this time? Ultimate++ never closes FreeType library on POSIX.

I have written simply function (FontFc.cpp - line 31):
bool sDoneFt()
{
	if(sFTlib)
		return FT_Done_FreeType(sFTlib) == 0;
}


This function should release major part of memory that was allocated by FreeType. I have tested it using following EXITBLOCK:
EXITBLOCK 
{
    sDoneFt();
}


But, there is one problem. I don't know where we need to invoke this function in upp library. I have looked at Font.cpp, but I can't find good place there.

Sincerely,
Klugier


U++ - one framework to rule them all.

[Updated on: Thu, 27 June 2013 21:19]

Report message to a moderator

Re: [Memory leak] Memory leak in FreeType. [message #40016 is a reply to message #40001] Sun, 26 May 2013 17:16 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
klugier wrote on Fri, 24 May 2013 17:15

Hello,

I have found memory leak in FreeType code. What's wrong this time? Ultimate++ never closes FreeType library on POSIX.

I have written simply function (FontFc.cpp - line 31):
bool sDoneFt()
{
	if(sFTlib)
		return FT_Done_FreeType(sFTlib) == 0;
}


This function should release major part of memory that was allocated by FreeType. I have tested it using following EXITBLOCK:
EXITBLOCK 
{
    sDoneFt();
}


But, there is one problem. I don't know where we need to invoke this function in upp library. I have looked at Font.cpp, but I can't find good place there.

Sincerely,
Klugier



What is the problem with putting EXITBLOCK there? (Applied the fix there).

Mirek
Previous Topic: Memory Mapped Files
Next Topic: Smtp: compiling error in smtp.h
Goto Forum:
  


Current Time: Wed Apr 24 15:31:07 CEST 2024

Total time taken to generate the page: 0.01809 seconds