comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: IDLgrPolygon Leak?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDLgrPolygon Leak? [message #69995 is a reply to message #69994] Wed, 03 March 2010 15:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
kBob writes:

>
> Not a memory leak, but a polygon leak.
>
> The 2010 IDL User Group meeting got me inspired to work with some
> object graphics mapping.
>
> However, I am running into some problems with adding a Shapefile to a
> object graphics window. When I call the IDLgrPOLYGON to draw and fill
> the shapefile vertices, there seems to be a leak or overflowing the
> polygon.
>
> Any thoughts on why. Sample code below. The IDLgrPOLYGON is set to
> work with vertices that only have one part. Anything else, the
> IDLgrPOLYLINE is used.

Kelly, you probably already figured this out,
but XObjView doesn't destroy the object that is handed
to it. You have to do that yourself. All this memory
leaking is just due to the model object you created.
For example, you can change your main routine like this.

PRO Test_PolyShp

COMPILE_OPT DEFINT32, STRICTARR

CountryModel, oModelCntry
XOBJVIEW, oModelCntry, /BLOCK
Obj_Destroy, oModelCntry

;WARNING: Big time memory leak
;Do IDL> HEAP_GC, /Verbose

END


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Write PNG from plots with different color tables??
Next Topic: Re: DICOM write functionality

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 07:44:11 PDT 2025

Total time taken to generate the page: 0.08156 seconds