[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to free yylval
From: |
cwhite |
Subject: |
how to free yylval |
Date: |
Sun, 6 Jan 2008 22:20:18 -0800 (PST) |
Hi,
I use
yylval.string_type = strdup(yytext);
in my flex file but it seems that this is wasteful and it may cause memory
leaks. I thought that yytext gets replaced everytime the lexer is called so
how is this wasteful? How do I free yylval so that those don't happen?
Perhaps there is an alternative to strdup, I'd like to know what that is.
Thanks.
--
View this message in context:
http://www.nabble.com/how-to-free-yylval-tp14659563p14659563.html
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.
- how to free yylval,
cwhite <=