(This thread is under Delphi, but I couldn't resist to mention here how it's for FPC.)

FPC already includes memory leaking unit, it's called HeapTrc. You can explicitly add it to your uses clause (just like some other mem leaker detectors for Delphi, since they should work with FPC as long as they do not depend on any Delphi internals). You can also just compile your program with -gh command-line option, this implicitly adds HeapTrc to your uses clause (this is handy, because this way you don't have to edit source code to turn mem leaking detecting on; you only change the FPC command-line, or "Compiler Options" in Lazarus).

There is also a related option -gc that activates pointer checking. And another related option is -gl, this inserts line information into your executable. Together all these options will notify you about any access to wrong place in the memory (without them, it's never guaranteed that you will get segfault), and any memory leak. And you will get backtrace telling you exactly where you tried to access invalid pointer or where you allocated memory that was left unallocated at program exit.

So if you're using FPC, it's highly adviced to compile all debug code with -gh -gl options. -gc is also great, although in some cases it can slow down the code too much.

That would be too obvious Wink But isn't TForm freeing its child objects too, so why not other objects?
cairnswm already explained it, I'll just say it once again using different words:

Every descendant of TComponent (like TForm) frees all the objects it "owns". One component is an owner of another when it's passed as the AOwner parameter to the constructor. This means that when you create MyObject like

[pascal]
MyObject := TMyObject.Create(MyOwnerObject);
[/pascal]

then MyObject will be automatically freed when MyOwnerObject will be freed. All you have to do for this is to make MyObject and MyOwnerObject classes descend from TComponent.

You can also use TObjectList class, it will automatically free it's items when OwnsObjects is true.