RE: [OpenMap Users] Free up some memory

From: John McMahon <jmcmahon_at_mobilvox.com>
Date: Thu, 4 Feb 2010 12:57:26 -0500

I figured it out. The byte[] was getting stuck in OMGraphicList adding a
few lines to my removed() method seems to have taken care of my memory
issue.

 

    _at_Override

    public void removed()

    {

      OMGraphicList gl = super.getList();

      gl.remove(raster);

      raster = null;

    }

 

Thanks,

John

 

 

From: John McMahon [mailto:jmcmahon_at_mobilvox.com]
Sent: Wednesday, February 03, 2010 4:56 PM
To: openmap_at_bbn.com; openmap-users_at_bbn.com
Subject: [OpenMap Users] Free up some memory

 

Hello all,

 

I am having a problem getting layers to be removed from memory after they
have been removed from the layer handler. Old layers (byte[]) seem to be
just building up in Heap Space.

 

I have a class called OmRasterLayer that extends OmGraphicHandlerPlugIn, and
this is the class that creates the raster layers. We use OMScalingRaster
and Layer to hold the layer information. OmRasterLayer also implements the
removed() method that nullifies the raster and layer objects upon removing
the layer from the LayerHandler.

 

This is what my removed() method looks like:

 

    _at_Override

    public void removed()

    {

      raster = null;

      layer = null;

    }

 

I'm also calling this method manually upon removing a layer from the
LayerHandler.

 

Is there something else I need to do in order to free up this memory?

 

I am using OpenMap 4.6.3.

 

Thanks,

John

 



--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Feb 04 2010 - 13:27:22 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT