free memory allocated by mpf_get_str

LiuEmma yanjiyun2002 at hotmail.com
Mon May 4 09:48:59 CEST 2009


Hi, 

 

I encountered a problem when I use mpg_get_str. 

 

ch = mpf_get_str(NULL,&exp,10,MAX_DIGITS + 1,temp);

 

According to the manual, If str is NULL, the result string is allocated using the current allocation function. So I think I should free the memory allocated by this function and I tried free(ch) and delete ch, but failed. It always said data abort. 

 

Would anyone tell me the correct way to free it?

 

Thanks!

_________________________________________________________________
上MClub和Messenger好友一起都市寻宝!
http://club.msn.cn/?from=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gmplib.org/list-archives/gmp-discuss/attachments/20090504/9c3f513c/attachment.html>


More information about the gmp-discuss mailing list