On 08.02.2013 18:54, ColdBear wrote: > Is there an easy way of tracking down which particular instance of a > TDIItemHandler may be the cause of this ? > > I use a lot of different TDIItemHandler objects in a client server > application and only apparently get the error on the server side when > clients disconnect abnormally. Obviously there are one or more instances of > some TDIItemHandlers being left intact when I close down the server, but how > to identify which ones ? The DIContainers exception "ItemHandler in use during destruction" occurs because your application leaks memory. So you can use any memory monitor to find out where the leak happens. In later Delphi versions you can set the global variable System.ReportMemoryLeaksOnShutdown to True to report memory leaks on shutdown. For earlier Delphi versions, you can use FastMM (http://sourceforge.net/projects/fastmm/) to do the same thing. Both utilities list memory leaks with stack trace so you can see exactly where you application allocates the DIContainers descendent which is not freed. Ralf _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa