<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" id="owaParaStyle"></style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">
<div>Hi,</div>
<div><br>
</div>
in some function that return a value with PV_VAL_PKG or PV_VAL_SHM, the allocated memory is supposed to be freed by core ? 
<div><br>
</div>
<div>
<div>script example</div>
<div><br>
</div>
<div>my_function("some param","$var(result)");</div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">in code => </span></div>
<div>dst_val->flags = PV_VAL_STR | PV_VAL_PKG;</div>
<div><span style="font-size: 10pt;">dst_pv->setf(msg, &dst_pv->pvp, (int)EQ_T, &dst_val);</span></div>
<div><br>
</div>
<div>when $var(result) is freed, will it free the allocated string ?</div>
<div><br>
</div>
<div><br>
</div>
<div>if( $(myPvar{my.mytransform,transformParameter}) == $null) {</div>
<div> $var(x) = <span style="font-size: 10pt;">$(myPvar{my.mytransform,transformParameter});</span></div>
<div>}</div>
<div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">in code => </span></div>
<div>dst_val->flags = PV_VAL_STR | PV_VAL_PKG;</div>
<div><br>
</div>
</div>
<div>will the memory allocated <span style="font-size: 10pt;">be freed</span><span style="font-size: 10pt;">  in the comparison line ?</span></div>
<div><span style="font-size: 10pt;">will</span><span style="font-size: 10pt;"> </span><span style="font-size: 10pt;">the memory allocated </span><span style="font-size: 10pt;">be freed</span><span style="font-size: 10pt;">  when $var(x) is freed ?</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
<div><span style="font-size: 10pt;">thank you</span></div>
<div><span style="font-size: 10pt;"><br>
</span></div>
</div>
</div>
</body>
</html>