Archived

This forum has been archived. Please start a new discussion on GitHub.

No memory leak using smart pointer?

Hi, all! I am writing a server with ice, which massively uses smart pointer. I found two wield things.
1. client send request to server periodically like this:
while(true) {
rpc(); // call rpc method this server provides.
sleep(1000); // sleep for one second.
}
everything is ok.

2. client send flooding request to server like this:
while(true) {
rpc(); // call rpc method this server provides.
}
the consumption of cpu and memory are rising very quickly.

so i want to know is this problem related to smart pointer, and when memory is revoked for reference-counting? please help!

Comments

  • mes
    mes California
    Hi,

    It's difficult to say what could be causing these issues without more information:

    * What operating system, compiler, and Ice version are you using?
    * Can you provide a small example that reproduces the problem?

    Regards,
    Mark
  • mes wrote: »
    Hi,

    It's difficult to say what could be causing these issues without more information:

    * What operating system, compiler, and Ice version are you using?
    * Can you provide a small example that reproduces the problem?

    Regards,
    Mark

    thanks for your reply! my environment is as follows:
    1. os: windwos server 2003
    2. compiler: msvc 9.0
    3. ice: 3.4.1

    after my app running for days, i noticed that the memory app consumes will rise continually at first to a very high value, and then drop to a very low value, and repeating this process. so i want know is this related to some mechanism of reference-counting? and is it possible to manually shorten the period of revoking memory?
  • this thread has been closed. referring to unknown-exception-connection-monitor