johnf wrote:
On Wednesday 29 March 2006 09:14, Marc Weustink wrote:

johnf wrote:

On Wednesday 29 March 2006 08:41, Mattias Gaertner wrote:

On Wed, 29 Mar 2006 18:23:48 +0200

Marc Weustink <[EMAIL PROTECTED]> wrote:

johnf wrote:

Using a terminal I start my app.  After opening and closing a form (not
the  main form) and then closing the main form I get the following:

[TGtkWidgetSet.Destroy] WARNING: There are 4 unreleased GDIObjects, a
detailed  dump follows:

This is an internal message for the gtkwidgetset only. When using the
LCL, this messasage should never occur.

This appear, when for instance you forgot to free four TBitmap, so it is
not an internal message only.


I guess somehow I'm not closing the form correctly.  Can anyone provide
a clue  or a direction for me to check what is still open.  Or maybe a
link that  describes what steps to take to discover the unreleased
objects.

What is on your forms ? How are you closing your forms ?

Use heaptrc (compiler options -> linking).
If this does not show the unreleased memory, then compile the LCL clean
with -dDebugLCLComponents.


Mattias

You are correct.  It is coming from my imagelist. Now I include
ImageList1.Destroy; in my formclose procedure.

How did you create this Imagelist ?
If you put it on a form in the IDE or if you created it with a form as
owner, it should get destroyed when you close your form.

Marc


I created the imagelist using the IDE (imagelist editor). But in doing so the IDE reported an error when saving from the imagelist editor. I don't recall what the error said but it offered to continue or cancel. I decided to continue. I then saved the project and closed. When I re-opened the project and my imagelist along with my graphics was there. That's all I did. But I have also discovered that a Tbitbtn with a graphic is leaving a unreleased GDIObject when closing. So the issue is not limited to the imagelist. My graphics are in a sub-directory just below the project. Was this wrong? Is there a different way I should have added graphics?

I don't know how you close your forms, but normally the graphics are automatically freed in this case.
I've tried it here, but I cannot reproduce.

Marc

_________________________________________________________________
    To unsubscribe: mail [EMAIL PROTECTED] with
               "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to