[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Forcing garbage collection

I use the following code in a sample action so I just hit a button in my IDE. Note you will have to adjust your profile id.

IProfileRegistry profileRegistry = (IProfileRegistry) ServiceHelper.getService(Activator.getContext(), IProfileRegistry.class.getName());
if (profileRegistry == null)
throw new RuntimeException("Unable to acquire the profile registry service.");
IProfile profile = "">profileRegistry.getProfile("SDKProfile");
new GarbageCollector().runGC(profile);

There is also an application extension that you could use. Look in the org.eclipse.equinox.p2.garbagecollector bundle.

p2-dev-bounces@xxxxxxxxxxx wrote on 02/24/2009 01:57:41 PM:

> Is there a way to initiate a garbage collection cycle for unused
> bundles? I am running repetitive test and it would be nice if I
> could remove the old bundles before starting a new test cycle.