trichview.com

trichview.support




Re: Memoryleaks??


Return to index


Author

Message

Pieter E.

Posted: 09/28/2004 20:10:56


The following code I use:


if(RichViewEdit1->CurItemStyle == rvsPicture)

{

  AnsiString s;

  int iTag;

  TGraphic *grPicture;

  TRVVAlign VAlign;

  RichViewEdit1->GetCurrentPictureInfo(s, grPicture, VAlign, iTag);


  Panel1->Caption = grPicture->Width;


  grPicture = NULL;

  delete grPicture;

}


At the end I delete grPicture, so I don't get memoryleaks...



"Sergey Tkachenko" <[email protected]> wrote:

>How do you use grPicture?

>If you use it for AddPictureEx, InsertPicture, SetPictureInfo and similar

>functions, you must not free it yourself. After calling these methods with

>grPicture as a parameter, grPicture becomes owned by TRichView. It will

free

>it itself.

>

>

>





Powered by ABC Amber Outlook Express Converter