App getting bigger and bigger

Discussion in 'Perl Misc' started by Yannick Turgeon, Oct 13, 2003.

  1. Hello all,

    I just make a program in perl. My first one in fact. Which use some WWW
    packages to start a http session, log to a site, download some pages and treat
    these data.

    The problem I have now it's that while executing, my program is taking
    more and more memory. What should I look for to solve this? Perl has a
    garbagge collector so I did not worry freing anything. Should I?

    The program is a endless loop (while(1)...). At each iteration it creates
    objects inside the only function called:

    Create my objects Obj
    while(1){
    Obj->CallMyFunction();
    sleep(60);
    }

    I supposed every object and variable created inside CallMyFunction() were
    freed from memory after quiting the function. Inside this function, I
    create another type of object which has "Obj" has member variable. Could it
    cause a problem. I do not store anything in Obj at each iteration. It has
    its initial variables and they don't change.

    Hope it's clear and thanks for your help.

    Yannick
     
    Yannick Turgeon, Oct 13, 2003
    #1
    1. Advertising

  2. Forget about this.

    One of the package I use was storing EVERY webpage I was downloading to
    provide some other functionality. You can imagine!

    Yannick

    Le Mon, 13 Oct 2003 15:23:09 -0400, Yannick Turgeon a écrit :

    > Hello all,
    >
    > I just make a program in perl. My first one in fact. Which use some WWW
    > packages to start a http session, log to a site, download some pages and treat
    > these data.
    >
    > The problem I have now it's that while executing, my program is taking
    > more and more memory. What should I look for to solve this? Perl has a
    > garbagge collector so I did not worry freing anything. Should I?
    >
    > The program is a endless loop (while(1)...). At each iteration it creates
    > objects inside the only function called:
    >
    > Create my objects Obj
    > while(1){
    > Obj->CallMyFunction();
    > sleep(60);
    > }
    >
    > I supposed every object and variable created inside CallMyFunction() were
    > freed from memory after quiting the function. Inside this function, I
    > create another type of object which has "Obj" has member variable. Could it
    > cause a problem. I do not store anything in Obj at each iteration. It has
    > its initial variables and they don't change.
    >
    > Hope it's clear and thanks for your help.
    >
    > Yannick
     
    Yannick Turgeon, Oct 14, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?VG9tYXMgUEFKRVI=?=

    bigger buffer corrupts file

    =?Utf-8?B?VG9tYXMgUEFKRVI=?=, Sep 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    418
    =?Utf-8?B?VG9tYXMgUEFKRVI=?=
    Sep 30, 2004
  2. Rahmi Acar
    Replies:
    0
    Views:
    350
    Rahmi Acar
    Apr 20, 2004
  3. Mikkel christensen
    Replies:
    4
    Views:
    606
    Gianni Mariani
    Nov 7, 2004
  4. Replies:
    2
    Views:
    796
    Filip Larsen
    Apr 10, 2007
  5. C3
    Replies:
    1
    Views:
    123
    Tad McClellan
    Oct 30, 2006
Loading...

Share This Page