• If I have the following code in a OnPrepareImageforSaving event

    Code
    wpo := (TextObject.ObjRef as TWPOImage);
        wpo.SaveToFile(TempPath,'temp.jpg','', True);


    It seems to leak a Bitmap, Jpeg and Memorystream when the image contains a bitmap (sametext(wpo.FileExtension, 'bmp')). I don't have the full source so I'm not sure what's going on, but I presume it is a problem with the conversion of the bitmap to a jpeg. The code is part of my conversion to an HTML email.
    Version 7.33.1

    Alister.

  • Yes, you are correct about the code, it wasn't finding the unit when I CTRL+Clicked on the class, but CTRL+Enter on the unit name was fine. The leak doesn't seem to be related to aCompressedStream. Here is the full code for the event - let me know if I'm doing something wrong:

    And here is the FastMM4 memory leak report, although FastMM seems to generate an exception on close so the EAccessViolation and UnicodeString are not related to this issue:

    --------------------------------2017/6/8 11:15:59--------------------------------
    A memory block has been leaked. The size is: 8356

    This block was allocated by thread 0x27F4, and the stack trace (return addresses) at the time was:
    4D0C10 [System.Classes][Classes.TMemoryStream.Realloc$qqrri]
    4D0B58 [System.Classes][Classes.TMemoryStream.SetCapacity$qqri]
    4D0C74 [System.Classes][Classes.TMemoryStream.Write$qqrpxvi]
    85BC9E [Vcl.Imaging.jpeg][Imaging.Jpeg.jfwrite$qqrpxviip22System.Classes.TStream]
    868D13 [Vcl.Imaging.jpeg]
    869B6C [Vcl.Imaging.jpeg][Imaging.Jpeg.jpeg_finish_compress$qqrr37Vcl.Imaging.Jpeg.jpeg_compress_struct]
    85C63D [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.Compress$qqrv]
    85CF2A [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.JPEGNeeded$qqrv]
    CD6D69 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.CompressEx$qqrr20System.UnicodeStringrp28System.Classes.TMemoryStreamrooi][1156]
    CD73A2 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.SaveToFile$qqr20System.UnicodeStringt1t1op28System.Classes.TMemoryStream][1275]
    42018C [FastMM4.pas][FastMM4][DebugGetMem$qqri][9631]

    The block is currently used for an object of class: Unknown

    The allocation number is: 2210649

    Current memory dump of 256 bytes starting at pointer address 7A6D05F0:
    FF D8 FF E0 00 10 4A 46 49 46 00 01 01 00 00 01 00 01 00 00 FF DB 00 43 00 03 02 02 03 02 02 03
    03 03 03 04 03 03 04 05 08 05 05 04 04 05 0A 07 07 06 08 0C 0A 0C 0C 0B 0A 0B 0B 0D 0E 12 10 0D
    0E 11 0E 0B 0B 10 16 10 11 13 14 15 15 15 0C 0F 17 18 16 14 18 12 14 15 14 FF DB 00 43 01 03 04
    04 05 04 05 09 05 05 09 14 0D 0B 0D 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14
    14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 14 FF C0
    00 11 08 00 11 00 11 03 01 22 00 02 11 01 03 11 01 FF C4 00 1F 00 00 01 05 01 01 01 01 01 01 00
    00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0A 0B FF C4 00 B5 10 00 02 01 03 03 02 04 03 05
    05 04 04 00 00 01 7D 01 02 03 00 04 11 05 12 21 31 41 06 13 51 61 07 22 71 14 32 81 91 A1 08 23
    ÿ Ø ÿ à . . J F I F . . . . . . . . . . ÿ Û . C . . . . . . . .
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    . . . . . . . . . . . . . . . . . . . . . . . . . ÿ Û . C . . .
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ÿ À
    . . . . . . . . . " . . . . . . . ÿ Ä . . . . . . . . . . . . .
    . . . . . . . . . . . . . . . . . . ÿ Ä . µ . . . . . . . . . .
    . . . . . . } . . . . . . . . ! 1 A . . Q a . " q . 2 ‘ ¡ . #

    --------------------------------2017/6/8 11:15:59--------------------------------
    A memory block has been leaked. The size is: 36

    This block was allocated by thread 0x27F4, and the stack trace (return addresses) at the time was:
    40770A [Vcl.ComCtrls.pas][System][@GetMem$qqri][34370]
    40A20B [Vcl.ComCtrls.pas][System][TObject.NewInstance$qqrv][34370]
    40AA32 [Vcl.ComCtrls.pas][System][@ClassCreate$qqrpvzc][34370]
    40A37C [Vcl.ComCtrls.pas][System][TObject.$bctr$qqrv][34370]
    40A3AB [Vcl.ComCtrls.pas][System][TObject.Free$qqrv][34370]
    53DA55 [Vcl.Graphics][Graphics.TSharedImage.Release$qqrv]
    85CFA8 [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.NewImage$qqrv]
    85BF40 [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.Assign$qqrp26System.Classes.TPersistent]
    CD6D61 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.CompressEx$qqrr20System.UnicodeStringrp28System.Classes.TMemoryStreamrooi][1155]
    CD73A2 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.SaveToFile$qqr20System.UnicodeStringt1t1op28System.Classes.TMemoryStream][1275]
    42018C [FastMM4.pas][FastMM4][DebugGetMem$qqri][9631]

    The block is currently used for an object of class: TJPEGData

    The allocation number is: 2210627

    Current memory dump of 256 bytes starting at pointer address 7A711300:
    08 B4 85 00 01 00 00 00 B0 13 71 7A 11 00 00 00 11 00 00 00 00 00 00 00 00 00 00 00 E2 65 61 7B
    80 80 80 80 80 80 80 80 00 00 00 00 D0 BD 70 7A 00 00 00 00 00 00 00 00 C8 00 42 00 00 00 00 00
    47 BB 21 00 0A 77 40 00 0B A2 40 00 32 AA 40 00 7C A3 40 00 DA E4 85 00 1F C4 85 00 3C 19 BB 77
    63 A8 B6 77 51 BF 85 00 2A CF 85 00 69 6D CD 00 F4 27 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 18 00 00 00 00 00 00 00 8A C4 2D 6E 60 A3 4A 00 F0 05 6D 7A 83 02 00 00 83 02 00 00
    00 20 00 00 00 00 00 00 75 3B D2 91 80 80 80 80 80 80 80 80 80 80 80 80 00 00 00 00 11 CD 70 7A
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 56 C5 21 00 0A 77 40 00 17 C2 40 00 48 C4 40 00
    . ´ … . . . . . ° . q z . . . . . . . . . . . . . . . . â e a {
    € € € € € € € € . . . . Ð ½ p z . . . . . . . . È . B . . . . .
    G » ! . . w @ . . ¢ @ . 2 ª @ . | £ @ . Ú ä … . . Ä … . < . » w
    c ¨ ¶ w Q ¿ … . * Ï … . i m Í . ô ' . . . . . . . . . . . . . .
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    . . . . . . . . . . . . Š Ä - n ` £ J . ð . m z ƒ . . . ƒ . . .
    . . . . . . . u ; Ò ‘ € € € € € € € € € € € € . . . . . Í p z
    . . . . . . . . . . . . . . . . V Å ! . . w @ . . Â @ . H Ä @ .

    --------------------------------2017/6/8 11:15:59--------------------------------
    A memory block has been leaked. The size is: 36

    This block was allocated by thread 0x27F4, and the stack trace (return addresses) at the time was:
    40770A [Vcl.ComCtrls.pas][System][@GetMem$qqri][34370]
    40A20B [Vcl.ComCtrls.pas][System][TObject.NewInstance$qqrv][34370]
    40AA32 [Vcl.ComCtrls.pas][System][@ClassCreate$qqrpvzc][34370]
    40A37C [Vcl.ComCtrls.pas][System][TObject.$bctr$qqrv][34370]
    85E4DA [Vcl.Imaging.jpeg][Imaging.Jpeg.@jpeg_get_small$qqrv]
    85C41F [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.Compress$qqrv]
    77BB193C [Unknown function at RtlpNtEnumerateSubKey]
    77B6A863 [Unknown function at RtlUlonglongByteSwap]
    85BF51 [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.Assign$qqrp26System.Classes.TPersistent]
    85CF2A [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.JPEGNeeded$qqrv]
    CD6D69 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.CompressEx$qqrr20System.UnicodeStringrp28System.Classes.TMemoryStreamrooi][1156]

    The block is currently used for an object of class: TMemoryStream

    The allocation number is: 2210631

    Current memory dump of 256 bytes starting at pointer address 7A7113B0:
    60 A3 4A 00 F0 05 6D 7A 83 02 00 00 83 02 00 00 00 20 00 00 00 00 00 00 75 3B D2 91 80 80 80 80
    80 80 80 80 80 80 80 80 00 00 00 00 11 CD 70 7A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    56 C5 21 00 0A 77 40 00 17 C2 40 00 48 C4 40 00 A5 CA 4C 00 79 08 E1 00 60 7A E1 00 28 74 E1 00
    86 42 4E 00 37 B8 54 00 F4 40 4E 00 67 A4 56 00 F4 27 00 00 F4 27 00 00 D1 C2 40 00 F1 DF 40 00
    15 DF 40 00 39 E0 40 00 C3 F3 40 00 F5 EF 40 00 4D 37 4D 00 72 F2 40 00 53 D9 4C 00 52 D2 4C 00
    AB A3 40 00 1A 00 00 00 B0 04 02 00 E6 8B 7D 82 E4 5B CE 01 80 80 80 80 80 80 80 80 80 80 80 80
    80 80 80 80 80 80 80 80 80 80 19 74 82 7D 80 80 80 80 80 80 80 80 80 80 00 00 00 00 91 2A 71 7A
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 F6 C7 21 00 0A 77 40 00 17 C2 40 00 48 C4 40 00
    ` £ J . ð . m z ƒ . . . ƒ . . . . . . . . . . u ; Ò ‘ € € € €
    € € € € € € € € . . . . . Í p z . . . . . . . . . . . . . . . .
    V Å ! . . w @ . . Â @ . H Ä @ . ¥ Ê L . y . á . ` z á . ( t á .
    † B N . 7 ¸ T . ô @ N . g ¤ V . ô ' . . ô ' . . Ñ Â @ . ñ ß @ .
    . ß @ . 9 à @ . Ã ó @ . õ ï @ . M 7 M . r ò @ . S Ù L . R Ò L .
    « £ @ . . . . . ° . . . æ ‹ } ‚ ä [ Î . € € € € € € € € € € € €
    € € € € € € € € € € . t ‚ } € € € € € € € € € € . . . . ‘ * q z
    . . . . . . . . . . . . . . . . ö Ç ! . . w @ . . Â @ . H Ä @ .

    --------------------------------2017/6/8 11:15:59--------------------------------
    A memory block has been leaked. The size is: 132

    This block was allocated by thread 0x27F4, and the stack trace (return addresses) at the time was:
    40770A [Vcl.ComCtrls.pas][System][@GetMem$qqri][34370]
    40A20B [Vcl.ComCtrls.pas][System][TObject.NewInstance$qqrv][34370]
    40AA32 [Vcl.ComCtrls.pas][System][@ClassCreate$qqrpvzc][34370]
    40A37C [Vcl.ComCtrls.pas][System][TObject.$bctr$qqrv][34370]
    53F71C [Vcl.Graphics][Graphics.TBitmap.NewImage$qqrp9HBITMAP__p10HPALETTE__rx13tagDIBSECTIONop22System.Classes.TStream]
    53E736 [Vcl.Graphics][Graphics.TBitmap.CopyImage$qqrp9HBITMAP__p10HPALETTE__rx13tagDIBSECTION]
    540818 [Vcl.Graphics][Graphics.TBitmap.SetSize$qqrii]
    540062 [Vcl.Graphics][Graphics.TBitmap.SetHeight$qqri]
    CD6CFB [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.CompressEx$qqrr20System.UnicodeStringrp28System.Classes.TMemoryStreamrooi][1151]
    BDD743 [WPRTEDefs][TWPTextStyle.AGet_CSS$qqrooooooi]
    CD73A2 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.SaveToFile$qqr20System.UnicodeStringt1t1op28System.Classes.TMemoryStream][1275]

    The block is currently used for an object of class: TBitmapImage

    The allocation number is: 2210620

    Current memory dump of 256 bytes starting at pointer address 7A85C1B0:
    E4 4B 53 00 01 00 00 00 1C 2D 05 3C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 11 00 00 00 11 00 00 00 44 00 00 00 01 00 20 00 00 00 00 00 00 00 00 00 11 00 00 00
    11 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DE 6C 50 7C 80 80 80 80
    80 80 80 80 80 80 80 80 00 00 00 00 B1 EB 85 7A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    03 60 24 00 0A 77 40 00 17 C2 40 00 3A D7 40 00 FA CB 4C 00 14 FA 91 00 AC 61 92 00 7A 61 92 00
    2F 62 92 00 48 D0 91 00 13 48 95 00 EF 08 E1 00 F4 27 00 00 F4 27 00 00 26 77 40 00 D4 C6 40 00
    37 D8 4C 00 06 CC 4C 00 08 FB 91 00 AC 61 92 00 7A 61 92 00 2F 62 92 00 48 D0 91 00 13 48 95 00
    ä K S . . . . . . - . < . . . . . . . . . . . . . . . . . . . .
    . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . .
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
    . . . . . . . . . . . . . . . . . . . . . . . . Þ l P | € € € €
    € € € € € € € € . . . . ± ë … z . . . . . . . . . . . . . . . .
    . ` $ . . w @ . . Â @ . : × @ . ú Ë L . . ú ‘ . ¬ a ’ . z a ’ .
    / b ’ . H Ð ‘ . . H • . ï . á . ô ' . . ô ' . . & w @ . Ô Æ @ .
    7 Ø L . . Ì L . . û ‘ . ¬ a ’ . z a ’ . / b ’ . H Ð ‘ . . H • .

    --------------------------------2017/6/8 11:15:59--------------------------------
    A memory block has been leaked. The size is: 100

    This block was allocated by thread 0x27F4, and the stack trace (return addresses) at the time was:
    40770A [Vcl.ComCtrls.pas][System][@GetMem$qqri][34370]
    40A20B [Vcl.ComCtrls.pas][System][TObject.NewInstance$qqrv][34370]
    40AA32 [Vcl.ComCtrls.pas][System][@ClassCreate$qqrpvzc][34370]
    85BE2B [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.$bctr$qqrv]
    CD6D47 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.CompressEx$qqrr20System.UnicodeStringrp28System.Classes.TMemoryStreamrooi][1152]
    CD6D53 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.CompressEx$qqrr20System.UnicodeStringrp28System.Classes.TMemoryStreamrooi][1154]
    CD73A2 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.SaveToFile$qqr20System.UnicodeStringt1t1op28System.Classes.TMemoryStream][1275]
    42018C [FastMM4.pas][FastMM4][DebugGetMem$qqri][9631]
    E10D87 [WPTools2Email.pas][WPTools2Email][TfHTML_EmailCreator.WPRichText1PrepareImageforSaving$qqrp34Wprtedefs.TWPRTFDataCollectionBasep29Wprtedefs.TWPCustomTextWriterp20Wprtedefs.TWPTextObjro][124]
    D11AF4 [WPCTRMemo.pas][WPCTRMemo][TWPCustomRtfEdit.DoPrepareImageforSaving$qqrp34Wprtedefs.TWPRTFDataCollectionBasep29Wprtedefs.TWPCustomTextWriterp20Wprtedefs.TWPTextObjro][13237]
    BF917A [WPRTEDefs][TWPRTFDataCollectionBase.PrepareImageforSaving$qqrp29Wprtedefs.TWPCustomTextWriterp20Wprtedefs.TWPTextObjror20System.UnicodeString]

    The block is currently used for an object of class: TJPEGImage

    The allocation number is: 2210625

    Current memory dump of 256 bytes starting at pointer address 7ABF0050:
    40 B6 85 00 00 00 00 00 64 47 4A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    00 00 00 00 B8 33 53 00 00 13 71 7A 10 FC C3 7A 00 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00
    00 00 00 00 5A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 27 81 16 78
    80 80 80 80 80 80 80 80 00 00 00 00 F1 FD BE 7A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    5D BB 21 00 0A 77 40 00 0B A2 40 00 32 AA 40 00 2B BE 85 00 A5 BA 53 00 F5 BD 53 00 11 34 C2 00
    A0 6D CD 00 A2 73 CD 00 8C 01 42 00 87 0D E1 00 F4 27 00 00 F4 27 00 00 26 77 40 00 29 A2 40 00
    7D AA 40 00 D2 BE 85 00 AB A3 40 00 73 B9 53 00 AB A3 40 00 7A 58 CD 00 7B 73 BF 00 A6 7F BF 00
    01 95 BF 00 5C 00 00 00 40 B6 85 00 16 45 FE 85 E4 5B CE 01 80 80 80 80 80 80 80 80 80 80 80 80
    @ ¶ … . . . . . d G J . . . . . . . . . . . . . . . . . . . . .
    . . . . ¸ 3 S . . . q z . ü Ã z . . . . . . . . . . . . . . . .
    . . . . Z . . . . . . . . . . . . . . . . . . . . . . . ' . x
    € € € € € € € € . . . . ñ ý ¾ z . . . . . . . . . . . . . . . .
    ] » ! . . w @ . . ¢ @ . 2 ª @ . + ¾ … . ¥ º S . õ ½ S . . 4 Â .
    m Í . ¢ s Í . Œ . B . ‡ . á . ô ' . . ô ' . . & w @ . ) ¢ @ .
    } ª @ . Ò ¾ … . « £ @ . s ¹ S . « £ @ . z X Í . { s ¿ . ¦ ¿ .
    . • ¿ . \ . . . @ ¶ … . . E þ … ä [ Î . € € € € € € € € € € € €

    --------------------------------2017/6/8 11:16:00--------------------------------
    A memory block has been leaked. The size is: 68

    This block was allocated by thread 0x27F4, and the stack trace (return addresses) at the time was:
    40770A [Vcl.ComCtrls.pas][System][@GetMem$qqri][34370]
    40A20B [Vcl.ComCtrls.pas][System][TObject.NewInstance$qqrv][34370]
    40AA32 [Vcl.ComCtrls.pas][System][@ClassCreate$qqrpvzc][34370]
    53E4FE [Vcl.Graphics][Graphics.TBitmap.$bctr$qqrv]
    40A385 [Vcl.ComCtrls.pas][System][TObject.$bctr$qqrv][34370]
    85CF87 [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.NewBitmap$qqrv]
    85BF47 [Vcl.Imaging.jpeg][Imaging.Jpeg.TJPEGImage.Assign$qqrp26System.Classes.TPersistent]
    CD6D61 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.CompressEx$qqrr20System.UnicodeStringrp28System.Classes.TMemoryStreamrooi][1155]
    CD73A2 [WPObj_Image.pas][WPOBJ_Image][TWPOCustomImage.SaveToFile$qqr20System.UnicodeStringt1t1op28System.Classes.TMemoryStream][1275]
    42018C [FastMM4.pas][FastMM4][DebugGetMem$qqri][9631]
    E10D87 [WPTools2Email.pas][WPTools2Email][TfHTML_EmailCreator.WPRichText1PrepareImageforSaving$qqrp34Wprtedefs.TWPRTFDataCollectionBasep29Wprtedefs.TWPCustomTextWriterp20Wprtedefs.TWPTextObjro][124]

    The block is currently used for an object of class: TBitmap

    The allocation number is: 2210628

    Current memory dump of 256 bytes starting at pointer address 7AC3FC10:
    B4 4E 53 00 00 00 00 00 64 47 4A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    01 00 00 00 B8 33 53 00 00 00 00 00 00 00 00 00 00 00 00 20 00 00 00 00 B0 C1 85 7A 00 00 00 00
    00 00 00 00 BC B5 60 79 00 00 00 00 41 F4 C3 7A 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    86 AA 20 00 79 77 40 00 2F F1 40 00 F8 65 BD 00 72 F2 40 00 90 27 BE 00 14 A2 CE 00 64 0B 4D 00
    86 0C 4D 00 C2 3B 54 77 96 CF BB 75 1C 5F BB 75 F4 27 00 00 F4 27 00 00 26 77 40 00 CC F3 40 00
    65 F4 BD 00 CC F3 40 00 AB A3 40 00 FF 1E C1 00 D1 18 C1 00 AB A3 40 00 B0 AD 4C 00 C7 92 BF 00
    15 03 42 00 22 00 00 00 00 00 00 00 D9 19 29 E6 E4 5B CE 01 80 80 80 80 80 80 80 80 80 80 80 80
    80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 26 E6 D6 19 80 80 80 80 80 80 80 80 80 80
    ´ N S . . . . . d G J . . . . . . . . . . . . . . . . . . . . .
    . . . . ¸ 3 S . . . . . . . . . . . . . . . . ° Á … z . . . .
    . . . . ¼ µ ` y . . . . A ô Ã z . . . . . . . . . . . . . . . .
    † ª . y w @ . / ñ @ . ø e ½ . r ò @ . ' ¾ . . ¢ Î . d . M .
    † . M . Â ; T w – Ï » u . _ » u ô ' . . ô ' . . & w @ . Ì ó @ .
    e ô ½ . Ì ó @ . « £ @ . ÿ . Á . Ñ . Á . « £ @ . ° ­ L . Ç ’ ¿ .
    . . B . " . . . . . . . Ù . ) æ ä [ Î . € € € € € € € € € € € €
    € € € € € € € € € € € € € € € € € € & æ Ö . € € € € € € € € € €

    --------------------------------2017/6/8 11:16:00--------------------------------
    A memory block has been leaked. The size is: 180

    This block was allocated by thread 0x27F4, and the stack trace (return addresses) at the time was:
    40770A [Vcl.ComCtrls.pas][System][@GetMem$qqri][34370]
    40C217 [Vcl.ComCtrls.pas][System][@NewUnicodeString$qqri][34370]
    40C448 [Vcl.ComCtrls.pas][System][@UStrFromPWCharLen$qqrr20System.UnicodeStringpbi][34370]
    434390 [System.SysUtils][Sysutils.FmtStr$qqrr20System.UnicodeStringx20System.UnicodeStringpx14System.TVarRecxirx31System.Sysutils.TFormatSettings]
    730073 [MidasLib][DllGetDataSnapClassObject$qqsrx5_GUIDt1pv]
    730073 [MidasLib][DllGetDataSnapClassObject$qqsrx5_GUIDt1pv]
    730073 [MidasLib][DllGetDataSnapClassObject$qqsrx5_GUIDt1pv]
    76B7912F [Unknown function at PrivateCoInternetCanonicalizeIUri]
    76B7914D [Unknown function at PrivateCoInternetCanonicalizeIUri]
    76B79837 [Unknown function at PrivateCoInternetCanonicalizeIUri]
    755D59EA [Unknown function at OpenRegKey]

    The block is currently used for an object of class: UnicodeString

    The allocation number is: 2826946

    Current memory dump of 256 bytes starting at pointer address 7EEE5F50:
    B0 04 02 00 01 00 00 00 53 00 00 00 41 00 63 00 63 00 65 00 73 00 73 00 20 00 76 00 69 00 6F 00
    6C 00 61 00 74 00 69 00 6F 00 6E 00 20 00 61 00 74 00 20 00 61 00 64 00 64 00 72 00 65 00 73 00
    73 00 20 00 30 00 30 00 34 00 31 00 30 00 43 00 39 00 30 00 20 00 69 00 6E 00 20 00 6D 00 6F 00
    64 00 75 00 6C 00 65 00 20 00 27 00 52 00 65 00 7A 00 79 00 2E 00 65 00 78 00 65 00 27 00 2E 00
    20 00 52 00 65 00 61 00 64 00 20 00 6F 00 66 00 20 00 61 00 64 00 64 00 72 00 65 00 73 00 73 00
    20 00 38 00 30 00 38 00 30 00 38 00 30 00 38 00 38 00 00 00 96 71 B5 A1 00 00 00 00 91 67 EE 7E
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 3D 81 00 00 0A 77 40 00 17 C2 40 00 A4 C6 40 00
    4F 79 4B 01 27 EA C6 01 78 BC 40 00 E4 BC 40 00 AF 3D 41 00 C0 8B C8 01 6A 33 3F 75 02 99 B1 77
    ° . . . . . . . S . . . A . c . c . e . s . s . . v . i . o .
    l . a . t . i . o . n . . a . t . . a . d . d . r . e . s .
    s . . 0 . 0 . 4 . 1 . 0 . C . 9 . 0 . . i . n . . m . o .
    d . u . l . e . . ' . R . e . z . y . . . e . x . e . ' . . .
    . R . e . a . d . . o . f . . a . d . d . r . e . s . s .
    . 8 . 0 . 8 . 0 . 8 . 0 . 8 . 8 . . . – q µ ¡ . . . . ‘ g î ~
    . . . . . . . . . . . . . . . . = . . . w @ . . Â @ . ¤ Æ @ .
    O y K . ' ê Æ . x ¼ @ . ä ¼ @ . ¯ = A . À ‹ È . j 3 ? u . ™ ± w

    --------------------------------2017/6/8 11:16:00--------------------------------
    A memory block has been leaked. The size is: 36

    This block was allocated by thread 0x27F4, and the stack trace (return addresses) at the time was:
    40770A [Vcl.ComCtrls.pas][System][@GetMem$qqri][34370]
    40A20B [Vcl.ComCtrls.pas][System][TObject.NewInstance$qqrv][34370]
    40AA32 [Vcl.ComCtrls.pas][System][@ClassCreate$qqrpvzc][34370]
    439A70 [System.SysUtils][Sysutils.Exception.$bctr$qqrx20System.UnicodeStringpx14System.TVarRecxi]
    44064E [System.SysUtils][Sysutils.TStringHelper.Substring$qqri]
    43A4D1 [System.SysUtils][CreateAVObject]
    7534E4E9 [Wow64PrepareForException]
    76FB7F75 [NdrFreeBuffer]
    76FB8048 [Unknown function at NdrGetBuffer]
    76FB65A6 [Unknown function at NdrCorrelationFree]
    770501A0 [Unknown function at NdrClientCall2]

    The block is currently used for an object of class: EAccessViolation

    The allocation number is: 2826942

    Current memory dump of 256 bytes starting at pointer address 7EEFE170:
    08 B2 42 00 5C 5F EE 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A8 FB 18 00 00 00 00 00
    BB B7 5C 2A 80 80 80 80 00 00 00 00 C1 1C F0 7E 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    BC 22 2B 00 0A 77 40 00 17 C2 40 00 48 C4 40 00 5D D8 40 00 4E 06 44 00 AE 32 43 00 76 A4 43 00
    D5 2B B1 77 E9 E4 34 75 75 7F FB 76 48 80 FB 76 F4 27 00 00 F4 27 00 00 26 77 40 00 36 C3 40 00
    5D A5 43 00 E9 E4 34 75 75 7F FB 76 48 80 FB 76 A6 65 FB 76 A0 01 05 77 A6 BC 94 77 A2 FC AF 77
    44 33 B4 77 1E 00 00 00 B0 04 02 00 F6 34 B2 14 E4 5B CE 01 80 80 80 80 80 80 80 80 80 80 80 80
    80 80 80 80 80 80 80 80 80 80 80 80 80 80 09 CB 4D EB 80 80 80 80 80 80 00 00 00 00 41 E0 EF 7E
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 98 07 00 00 79 77 40 00 23 F1 40 00 15 4A 81 00
    . ² B . \ _ î ~ . . . . . . . . . . . . . . . . ¨ û . . . . . .
    » · \ * € € € € . . . . Á . ð ~ . . . . . . . . . . . . . . . .
    ¼ " + . . w @ . . Â @ . H Ä @ . ] Ø @ . N . D . ® 2 C . v ¤ C .
    Õ + ± w é ä 4 u u û v H € û v ô ' . . ô ' . . & w @ . 6 Ã @ .
    ] ¥ C . é ä 4 u u û v H € û v ¦ e û v . . w ¦ ¼ ” w ¢ ü ¯ w
    D 3 ´ w . . . . ° . . . ö 4 ² . ä [ Î . € € € € € € € € € € € €
    € € € € € € € € € € € € € € . Ë M ë € € € € € € . . . . A à ï ~
    . . . . . . . . . . . . . . . . ˜ . . . y w @ . # ñ @ . . J .

    --------------------------------2017/6/8 11:16:00--------------------------------
    This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):

    21 - 36 bytes: EAccessViolation x 1, TMemoryStream x 1, TJPEGData x 1
    53 - 68 bytes: TBitmap x 1
    85 - 100 bytes: TJPEGImage x 1
    117 - 132 bytes: TBitmapImage x 1
    165 - 180 bytes: UnicodeString x 1

    The sizes of leaked medium and large blocks are (excluding expected leaks registered by pointer): 8356

    Note: Memory leak detail is logged to a text file in the same folder as this application. To disable this memory leak check, undefine "EnableMemoryLeakReporting".

  • There was an update to fix a memory prolem connected to bitmap painting.

    Please make sure in WPObj_image.pas there in LoadFromStream is this code:


    {$IFDEF USEGPP}
    if (CompareText(FileExtension,'emf')=0) or (CompareText(FileExtension, 'WMF') = 0)
    then
    FreeAndNil(FCompressedStream)
    else
    begin
    ...
    FreeAndNil(FGPImage); // 6.4.2017
    if HasGPPImage(obj) then
    ...
    end;
    {$ENDIF}