Overview
Features
Download
Documentation
Community
Add-Ons & Services

[Resolved] Memory Leaks on HTTPFormServer sample

Please post support and help requests here.

[Resolved] Memory Leaks on HTTPFormServer sample

Postby jazzmatazz » 14 May 2009, 09:43

Hello,

In first, sorry for my bad english.
A few months ago, I was very pleased to discover POCO librairies. It's VERY attractive by POCO functionality. Thanks you for your job!

But now, I realized by testing "HTTPFormServer" sample that on application exit, there are huge memory leaks.

Indeed, by simply changing these code lines:
Code: Select all
int main(int argc, char** argv)
{
   HTTPFormServer app;
   return app.run(argc, argv);
}


with:

Code: Select all
int main(int argc, char** argv)
{
   HTTPFormServer* app;
   app = new HTTPFormServer();
   app->run(argc, argv);
   app->release();

   _CrtDumpMemoryLeaks();
       return 0;
}


And we see in the console of Visual Studio the following thing:

Detected memory leaks!
Dumping objects ->
{990} normal block at 0x010EC448, 8 bytes long.
Data: < 8 > 98 D0 0E 01 38 D8 0E 01
{989} normal block at 0x010ED838, 176 bytes long.
Data: <X ( > J > 58 DC 28 10 01 CD CD CD 3E CB 0B 4A 00 00 00 00
{982} normal block at 0x010ED098, 176 bytes long.
Data: <X ( > J > 58 DC 28 10 01 CD CD CD 3E CB 0B 4A 00 00 00 00
{958} normal block at 0x010EBDC8, 100 bytes long.
Data: < default > 00 00 00 00 CD CD CD CD 64 65 66 61 75 6C 74 00
...


????
Last edited by jazzmatazz on 14 May 2009, 18:51, edited 3 times in total.
jazzmatazz
 
Posts: 13
Joined: 22 Feb 2009, 14:26

Re: Memory Leaks, POCO is Useless for big project?

Postby alex » 14 May 2009, 14:23

jazzmatazz wrote:????


Most likely false positive from static data (the dump executes before static data is released). See this post.

Now, we are not perfect and there is a possibility of real leak somewhere in the framework. If you can pinpoint precisely where the leak is, we'll look at it and fix it. In the meantime - until you have a rock-solid proof, please refrain from bombastic posts such as this one. POCO is NOT "useless for big projects". I am happily using it and so do many other people.
alex
 
Posts: 1086
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Memory Leaks on HTTPFormServer sample

Postby jazzmatazz » 14 May 2009, 18:31

Thanks for your reply.

In the meantime - until you have a rock-solid proof, please refrain from bombastic posts such as this one


Excuse me for my clumsiness, I immediately corrected the title of my post ;) I did not realize its bombastic hand (The English is very diffcult for me)
I plan to use POCO for a big project that will last two years to use on real time embedded machine. And I really wanted to make sure that I make the right choice.

If you can pinpoint precisely where the leak is, we'll look at it and fix it


In the HTTPFormServer sample :) On program closing.
The original source code of HTTPFormServer doesn't work, and even with a more proactive code as the following:
Code: Select all
HTTPFormServer* app;
app = new HTTPFormServer();
app->run(argc, argv);
app->release();

Thread::sleep(1000);

_CrtDumpMemoryLeaks();
return 0;


There is a big Memory Leak list at ending.
jazzmatazz
 
Posts: 13
Joined: 22 Feb 2009, 14:26

Re: Memory Leaks on HTTPFormServer sample

Postby jazzmatazz » 14 May 2009, 18:50

Excuse me for all!

My Leak Memory method was not correct!
The next code works good:
Code: Select all
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
HTTPFormServer app;
app.run(argc, argv);
return 0;


This message will slightest merit to propose a correct leak memory detecting method :oops:

Thanx
jazzmatazz
 
Posts: 13
Joined: 22 Feb 2009, 14:26


Return to Support

Who is online

Users browsing this forum: No registered users and 19 guests