JVM Languages
jqa800.txt
Associated article: What's Object Pooling All About?
Tags: JVM Languages
Published source code accompanying the article by Alexandre Sieira Vilar in which he discusses object pooling which can be used very effectively to reduce the number of garbage collection executions in a Java application. Also see JQA800.ZIP.
Java Q&A
by Alexandre Sieira Vilar
Listing One
class A {
public:
int i;
};
// Implicit memory allocation and deallocation.
int function1 ()
{
A a;
a.i = 0;
}
// Explicit memory allocation and deallocation.
int function2 ()
{
A *a = new A();
a->i = 0;
...


