in reply to memory leak in eval_pv?
eval_*(...) take the same flags as their cousins call_*(...) in that you must specify G_DISCARD to discard the return value of the eval or you'll leak SV's with refcount one.
Update: After speaking with ysth I learned that eval_pv(...) doesn't care about G_DISCARD. While my initial diagnosis was correct, you're not freeing the SV returned by eval_*(...), a solution that works is:
SvREFCNT_dec(eval_pv(...));
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: memory leak in eval_pv?
by lightspeed (Initiate) on May 16, 2007 at 11:13 UTC | |
by lightspeed (Initiate) on May 17, 2007 at 12:33 UTC |