
drichfield
New User
Feb 23, 2006, 10:10 PM
Post #1 of 4
(6349 views)
|
Win32::Perms Object and Memory Usage
|
Can't Post
|
|
have created a simple script that has to create 1 million Win32 objects. The following code is what creates each object in a loop: $DirFileObj = new Win32::Perms($SubFileDirPath); where $SubFileDirPath is a full path that changes in every loop iteration. The problem is that every time a new object is created, more memory is used and the Win32::Perms module wont give it up, so by the time you get to 100,000 objects, you memory usage is around 1GB. I figured that since i am resetting the $DirFileObj object every loop here that the memory would be reclaimed, but that's not the case. I have tried clearing the object with the following with no success: $DirFileObj = (); $DirFileObj = undef; Is there a way to reclaim this memory or possibly used only one object but update the path that is associated with it in each loop iteration? Thanks, Dan
|