H
horndude77
Hello,
I'm wanting to make a classloader which when all classes contained in
certain jars no longer have any live objects their classloader is
garbage collected. My initial idea was to use a WeakHash so the
classloader would automatically be garbage collected when memory is
needed, but I couldn't quite get that to work (I don't have the code
right now, but maybe I'll post that later). The reason we would like
this is because the memory for our project is constrained and we need
to have a fairly long uptime. After running a while having all these
extra classes around which are not always needed becomes a big
limitation.
So I'm wondering if this is possible or if you could point me in the
right direction. Thanks for the help!
-----Horndude77
I'm wanting to make a classloader which when all classes contained in
certain jars no longer have any live objects their classloader is
garbage collected. My initial idea was to use a WeakHash so the
classloader would automatically be garbage collected when memory is
needed, but I couldn't quite get that to work (I don't have the code
right now, but maybe I'll post that later). The reason we would like
this is because the memory for our project is constrained and we need
to have a fairly long uptime. After running a while having all these
extra classes around which are not always needed becomes a big
limitation.
So I'm wondering if this is possible or if you could point me in the
right direction. Thanks for the help!
-----Horndude77