PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Rick Smith <rsmith at nac dot net>
Subject: Re: Memory leak
Date: Apr 20 1998 6:40PM

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
> 
>