|
|
sybperl-l Archive
Up Prev Next
From: Shaun McClimon <smcclimon at frontierast dot com>
Subject: FW: Memory leak
Date: Apr 20 1998 8:03PM
I have tested similar code to that listed below and do not get a memory
leak.
However, when I do a large number of statements within my SQL used
injunction with ct_execute or ct_command and ct_send, even though I am
only printing out a relatively low number of lines I still get memory
leakage.
Why is this, all the SQL commands should be executing everything at the
Sybase server.
Shaun
-----Original Message-----
From: Rick Smith [SMTP:rsmith@nac.net]
Sent: Monday, April 20, 1998 1:41 PM
To: SYBPERL-L@trln.lib.unc.edu
Subject: Re: Memory leak
would this affect us if we're using code like below ?
$acct = Sybase::CTlib->ct_connect($uid, $pwd, $srv);
$acct->ct_execute("select * from dunning");
while(($rc = $acct->ct_results($restype)) == CS_SUCCEED) { next if
($restype == CS_CMD_DONE || $restype == CS_CMD_FAIL || $restype ==
CS_CMD_SUCCEED);
while (@data = $acct->ct_fetch)
{
.
.
.
On Mon, 20 Apr 1998, Michael Peppler wrote:
> Shaun McClimon writes:
> > Can someone help me with my code? This code
continues to use memory up
> > and has gotten as high as 40 megs. What is going
on?
> >
> > $ref = $T->ct_sql($IDS);
> > $del = $T->ct_sql("delete ids1db..tESC
where counter =
> > @dat[25]");
>
> ct_sql() leaks, unfortunately.
>
> I have not had the time to figure out exactly why it leaks,
when a
> similar code sequence that is not in a subroutine doesn't
leak.
>
> You can work around this by not using ct_sql(), and writing
your own
> ExecSql() routine that does not fetch any rows, for example.
>
> Michael
> --
> Michael Peppler -||- Data Migrations Inc.
> mpeppler@datamig.com -||- http://www.mbay.net/~mpeppler
> Int. Sybase User Group -||- http://www.isug.com
>
>
|