public interface MemoryLeak {
public void leak();
}

---------------------

import java.util.Vector;
public class C implements MemoryLeak {
Vector v = new Vector();
public void leak() {
v.add(new Object());
}
}

-------------------------

public class MyLeakerServlet extends javax.servlet.http.HttpServlet {
C lk = new C();
public void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) {
lk.leak();
res.getWriter().println("I'm leaking!!");
}
}

;-)

Antonio Fiol

Malcolm Warren wrote:

I'd be very interested to hear how one can allocate memory without it being de-referenced.
It's obviously something to avoid. Can you give a bit of detail?

Thanks.


On Fri, 2 Apr 2004 10:28:22 -0600, John Thompson <[EMAIL PROTECTED]> wrote:

I've been fighting a similar symptom. I downloaded the eval copy of
JProfiler and found the problem pretty quickly. I had some static classes
that kept allocating memory that never got de-referenced.

John

-----Original Message-----
From: LILES, DAVID (CONTRACTOR) [mailto:[EMAIL PROTECTED]
Sent: Friday, April 02, 2004 9:50 AM
To: [EMAIL PROTECTED]
Subject: Memory Leak Solution?

I've searched previous postings for a possible solution regarding the memory
leak thread that was posted previously but didn't seem to find an answer.

I'm running TC5 on IIS5 and have noticed that the memory gradually decreases
to the point where the server needs to be rebooted.

Does anyone know of a solution for this?

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]




Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to