Hi, >This is looking like an XP thing at the moment. Can either of you >reduce the problem to something that doesn't need Win32::GUI? I.e. can >we find out if it's a window creation/deletion thing, or a perl thing?
>Does it still leak if we only create a window (without the button)? YES! >Can someone run this with a fixed number of iterations, and tell me how >much memory is leaked per iteration? 56 - 60 K each iteration >Is all the memory returned when the app exits? YES! Also Jez asked if only 50% of the CPU was taken up... When running Task Manager Processes before commencement I have 99% System Idles processes. Only things open are a command prompt and Task Manager. Start code and figures vary but average 40% CPU to Perl.exe and 30% CPU to Explorer.exe, the figures change between these two executables by as much as 10%, however the total between the two stays at 70% total CPU. When terminating with Ctrl-C, note that perl.exe died straight away however Explorer.exe took a few moments more to die and return the memory. Regards, Chris > use strict; > use Win32::GUI; > > my ($W,$but); > while (1) { > $W = new Win32::GUI::Window( > #-name => "TestWindow", > -pos => [ 0, 0], > -size => [210, 200], > -text => "TestWindow", > ); > > $but=$W->AddButton( > #-name => "test", > -text => "Button 1", > -size => [ 70, 22 ], > -pos => [ 20, 20 ], > ); > } -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.3/374 - Release Date: 23/06/2006 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.9.4/375 - Release Date: 25/06/2006