Hi,

I did some more tests today. I installed the "Devel::Leak" perl package
on the linux computer. This can be used to count number of "object"
instances. I hope the package works ok because it's an very early
version number (0.02).

Test:
I added the data count function at five different parts of the script in
last mail.

1. Before the sub method "processFile" call
2. before the "my ($status) = $spamtest->check_message_text($msg);" line
3. after the "$spamtest->check_message_text($msg)" line
4. after the "$status->finish();" line
5. after the sub method "processFile" call

Result:

a) The number of "objects" between 2 and 4 differ with 262 each time.
This is a great number. But it does not seem to be the correct result.
b) The number of "objects" between 1 and 5 differ with 19 each time.
This is a problem, because I think that perl removes all data created
within a sub method call if the data is method local. But it looks like
SA is leaving some objects alive after processing one mail.

I tried to prove the results of the test.

a) I commented out the "$status->finish()" line. This results in the
same result as b). The number after the sub method call differ in 19 to
before the method call.
b) I commented out the complete SA code within the "processFile" method.
The result between 1 and 5 is that no objects are left on heap.


One more test:

I changed the code within the sub method to:

...
my $mail = Mail::SpamAssassin::NoMailAudit->new(data => [EMAIL PROTECTED]);
my ($status) = $spamtest->check($mail);
$status->finish();
$mail->finish();
...

The number of object created between the sub enter and sub leave is
still 19.

I hope this test help someone to track down the problem or help to check
that I made a mistake.

Bye
Klaus



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to