Issue 88 in ctemplate: use ctemplate leading some memory leak

14 views
Skip to first unread message

ctem...@googlecode.com

unread,
Mar 15, 2012, 2:44:19 AM3/15/12
to google-c...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 88 by xieyingf...@gmail.com: use ctemplate leading some memory
leak
http://code.google.com/p/ctemplate/issues/detail?id=88

Following is the source code in Visual Studio 2005 with Windows XP

#include <ctemplate/template.h>
#include <string>
#include <afxwin.h>

using namespace std;

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}

just compile these code in Multi-threaded Debug DLL (/MDd) mode and run the
application, you can find the memory leak like these

Detected memory leaks!
Dumping objects ->
{180} normal block at 0x003C8148, 32 bytes long.
Data: <img_src_url_esca> 69 6D 67 5F 73 72 63 5F 75 72 6C 5F 65 73 63 61
{177} normal block at 0x003C80D8, 48 bytes long.
Data: <img_src_url_esca> 69 6D 67 5F 73 72 63 5F 75 72 6C 5F 65 73 63 61
{174} normal block at 0x003C8068, 48 bytes long.
Data: <img_src_url_esca> 69 6D 67 5F 73 72 63 5F 75 72 6C 5F 65 73 63 61
{171} normal block at 0x003C8008, 32 bytes long.
Data: <url_escape_with_> 75 72 6C 5F 65 73 63 61 70 65 5F 77 69 74 68 5F
{168} normal block at 0x003C43C0, 48 bytes long.
Data: <javascript_escap> 6A 61 76 61 73 63 72 69 70 74 5F 65 73 63 61 70
{165} normal block at 0x003C4480, 32 bytes long.
Data: <url_escape_with_> 75 72 6C 5F 65 73 63 61 70 65 5F 77 69 74 68 5F
{162} normal block at 0x003C4360, 32 bytes long.
Data: <url_escape_with_> 75 72 6C 5F 65 73 63 61 70 65 5F 77 69 74 68 5F
{159} normal block at 0x003C4300, 32 bytes long.
Data: <url_escape_with_> 75 72 6C 5F 65 73 63 61 70 65 5F 77 69 74 68 5F
{156} normal block at 0x003C42A0, 32 bytes long.
Data: <url_query_escape> 75 72 6C 5F 71 75 65 72 79 5F 65 73 63 61 70 65
{153} normal block at 0x003C4240, 32 bytes long.
Data: <javascript_escap> 6A 61 76 61 73 63 72 69 70 74 5F 65 73 63 61 70
{150} normal block at 0x003C41E0, 32 bytes long.
Data: <html_escape_with> 68 74 6D 6C 5F 65 73 63 61 70 65 5F 77 69 74 68
{147} normal block at 0x003C4180, 32 bytes long.
Data: <html_escape_with> 68 74 6D 6C 5F 65 73 63 61 70 65 5F 77 69 74 68
{144} normal block at 0x003C4120, 32 bytes long.
Data: <html_escape_with> 68 74 6D 6C 5F 65 73 63 61 70 65 5F 77 69 74 68
{141} normal block at 0x003C40C0, 32 bytes long.
Data: <html_escape_with> 68 74 6D 6C 5F 65 73 63 61 70 65 5F 77 69 74 68
{138} normal block at 0x003C4060, 32 bytes long.
Data: < :< :< > 20 3A 3C 00 20 3A 3C 00 1D 8A 13 10 00 00 00 00
{137} normal block at 0x003C3C20, 1024 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
{136} normal block at 0x003C3B28, 184 bytes long.
Data: < > D4 88 13 10 00 04 00 00 00 04 00 00 00 00 00 00
{135} normal block at 0x003C3A80, 108 bytes long.
Data: < 9< `@< 9< > B0 39 3C 00 00 00 00 00 60 40 3C 00 B0 39 3C 00
{134} normal block at 0x003C3A20, 32 bytes long.
Data: <`@< `@< > 60 40 3C 00 60 40 3C 00 CD CD CD CD CD CD CD CD
{133} normal block at 0x003C39A8, 60 bytes long.
Data: < :< > 00 00 00 00 00 CD CD CD E0 3A 3C 00 CD CD CD CD
Object dump complete.

So I want to know whether I use the ctemplate-2.0 in a wrong way or it has
some bug about this problem?
Thank you!

ctem...@googlecode.com

unread,
Mar 15, 2012, 4:56:43 AM3/15/12
to google-c...@googlegroups.com
Updates:
Status: WontFix

Comment #1 on issue 88 by olafv...@gmail.com: use ctemplate leading some
memory leak
http://code.google.com/p/ctemplate/issues/detail?id=88

It's a bug in your tool, see
http://code.google.com/p/ctemplate/issues/detail?id=86

Reply all
Reply to author
Forward
0 new messages