Without going into the details of my cruddy code, let me outline the situation and then state the problem.
The Situation
I did a proof of concept, procedural hack that:
- reads chunks of data in from a binary file using sysread
- finds the overal structural separators that define data packets
- determines what kind of data packet it is
- further analyses the packet, breaking it into its separate channels
Now the project becomes real, requiring more sophistication, I take the "proof of concept" procedural hack and develop it into a perl module.
The main class is an data analyzer. The calling program, creates a new instansiation of this class, once, at the begining. After calling a method to open a data file, it then calls a method for giving it the next packet. The GetNextPacket method creates a new data object (using another class) for each data packet found. GetNexPacket returns the new object to the calling program, which typically keeps only a few of this packets around for data splicing.
The Problem
It appears, because of deteriorating performance, that these data objects are not being clobbered when they are no longer referenced by the calling program. (In fact, in the testing program for the module, the returned value of GetNextPacket is simply assigned to a scalar that is overwritten on each call.)
The Question(s)
How can I determined if these data objects are more persistant than I want? (I have looked at the process with both top (Linux) and Komodo (Dimdows), and nothing seems to be growing.) When should I create (bless) a new object, when not?
Gracias
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.