I'm sorry to be late to reply. I agree with you.
Good. But no need to change grx v2.3
I found the changelog notice about the bugfix (v2.2 -> v2.3 changes)
98/02/24 Fixed a bug in GrDestroyPattern() when freeing the bitmap planes (found&patched by Michal).
I should have sended the last mail before I checked on code of GrDestroyPattern(v2.3). I am using v2.2 because my grx is modified for "DOS/V".
Thank you for some of your advice.
Akira Watanabe
----- Original Message ----- $BAw?.<T(B : Hartmut Schirmer hartmut.schirmer@arcormail.de $B08@h(B : WATANABE AKIRA akira-wata@mail.nissan.co.jp Cc: grx@gnu.de; Uncle(Akira Watanabe) akira_wata@email.msn.com $BAw?.F|;~(B : 1999$BG/(B10$B7n(B13$BF|(B 2:28 $B7oL>(B : Re: Second Proposal(RE: A memory leak?)
On Tue, 12 Oct 1999, WATANABE AKIRA wrote:
But, I think that GrDestroyPattern can not free the memory created by
GrBuildPixmapFromBits() completely.
Oliginal source : Oliginal code can free a top of the frame memory area
only.
void GrDestroyPattern(GrPattern *p) { if(p->gp_ispixmap) { if(p->gp_pxp_source.gf_memflags & GCM_MYMEMORY) farfree(p->gp_pxp_source.gf_baseaddr); if(p->gp_pxp_source.gf_memflags & GCM_MYCONTEXT) free(p); return; } if(p->gp_bitmap.bmp_memflags) free(p); }
This is code from GRX v2.2. The v2.3 code is different and equvilent to your changes.
What do you think about above code?
Good. But no need to change grx v2.3
I found the changelog notice about the bugfix (v2.2 -> v2.3 changes)
98/02/24 Fixed a bug in GrDestroyPattern() when freeing the bitmap planes (found&patched by Michal).
Hartmut