4.8.2?

Steve Lime steve.lime at DNR.STATE.MN.US
Thu Mar 9 02:18:55 EST 2006


Jani: There are certainly possiblities for leaks. However, the rotation code isn't called for symbol types that don't support rotation so although the possiblity exists, it's not occuring. Still, it's confusing. The actual leak is that in the two functions where rotation is used the rotated symbol isn't cleaned up.

I'll take care of cleaning this up and created bug 1705 to track it.

Steve

>>> Jani Averbach <javerbach at EXTENDTHEREACH.COM> 03/06/06 2:59 PM >>>
> -----Original Message-----
> From:  On Behalf Of Steve Lime
> Sent: Monday, March 06, 2006 9:02 AM
> Subject: Re: 4.8.2?
> 
> This is the status as far as I know. I'll gladly help however I can.
> 
> >   - rolling back the symbol size computation to use just height (4.6
=
> >     behavior)
>   1) Jani was handling

OK, I have few comments/questions:

1) What happens when someone rotates a symbol?
   Let's say that I have (x,y) 2x100 pixmap symbol, and I rotate
   it 90deg, and say that my symbol size is 100. What should happen,
   is the symbol now 100x5000, or is it still 100x2?  What if I rotated
it
   only 45deg?


2) Secondly, I think I have found few memory leaks:

   mapsymbol.c: *msRotateSymbol
	
   At the line 1180 we allocate a new symbolObj, and then on the line
1188     (case MS_SYMBOL_ELLIPSE) we just return symbol,
   without freeing the newSymbol.
  
   In case of VECTOR we return the newSymbol (1233)

   In case of PIXMAP we return the newSymbol (1281)

   In case of TRUETYPE or 'default' we return the symbol (1286 and
   1290).

   So inside this function, we leak memory in three cases, and
   later when we are using this new symbol, we are leaking more:
   
   mapgd.c: msDrawMarkerSymbolGD

   in case of PIXMAP (1644), we are storing msRotateSymbol return
   value to symbol, but we are not releasing that value. The same
   thing is happening with VECTOR (1711).

If I am wrong, please correct me.


BR, Jani

SRC,LLC 
SRC in Action:
http://www.DemographicsNow.com

Join SRC at Extend 2006 - Disruptive Technology June 5-7, 2006 at the
Hyatt
Regency, Huntington Beach, CA For more details, click here:
http://www.extendthereach.com/extend06/



More information about the mapserver-dev mailing list