free memory allocated by mpf_get_str

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



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?



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the gmp-discuss mailing list