[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Memory Leak due to strdup even after using %destructor
From: |
harish.chaluvadi |
Subject: |
Memory Leak due to strdup even after using %destructor |
Date: |
Wed, 4 Feb 2009 12:10:31 +0530 |
hi ,
I am new to bison. I got a memory leak. Leak is due to the
strdup in lex file
astr [-a-zA-Z0-9_\.\/\,\<]*
{astr} {
yylval.text = strdup( (char *)yytext );
return ASTR;
}
I have added
%destructor { free($$); } ASTR
but still i am getting memory leaks(valgrind).
can anyone help me how to solve this ???????
Thanks & Regards,
Harish Kumar Chaluvadi.
- Memory Leak due to strdup even after using %destructor,
harish.chaluvadi <=