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

Home » Public Forums » archive » Bad Advice?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Bad Advice? [message #89595] Thu, 30 October 2014 11:14 Go to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Folks,

The latest article on the IDL Data Point blog contains this advice:

"Be very careful using the OBJ_DESTROY method."

I'm not sure this is particularly good advice, especially if you write
IDL code that might inadvertently be run on a non-IDL 8 version of IDL.
In those cases (and I think I would still argue in ALL cases), you might
want to be *sure* to use the OBJ_DESTROY method!

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Bad Advice? [message #89599 is a reply to message #89595] Thu, 30 October 2014 14:29 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Thursday, October 30, 2014 2:14:07 PM UTC-4, David Fanning wrote:
> Folks,
>
> The latest article on the IDL Data Point blog contains this advice:
>
> "Be very careful using the OBJ_DESTROY method."
>
> I'm not sure this is particularly good advice, especially if you write
> IDL code that might inadvertently be run on a non-IDL 8 version of IDL.
> In those cases (and I think I would still argue in ALL cases), you might
> want to be *sure* to use the OBJ_DESTROY method!

This is the clarity I come to expect from IDL :-)
Re: Bad Advice? [message #89602 is a reply to message #89595] Thu, 30 October 2014 16:00 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 10/30/14, 12:14 PM, David Fanning wrote:
> Folks,
>
> The latest article on the IDL Data Point blog contains this advice:
>
> "Be very careful using the OBJ_DESTROY method."
>
> I'm not sure this is particularly good advice, especially if you write
> IDL code that might inadvertently be run on a non-IDL 8 version of IDL.
> In those cases (and I think I would still argue in ALL cases), you might
> want to be *sure* to use the OBJ_DESTROY method!

Yes, I use OBJ_DESTROY as well since it's easy and doesn't make a
compatibility issue.

But the context from the article is to be careful with OBJ_DESTROY when
you have multiple references to a single heap variable. Calling
OBJ_DESTROY on one will destroy the reference of all of them.

Mike
--
Michael Galloy
www.michaelgalloy.com
Modern IDL: A Guide to IDL Programming (http://modernidl.idldev.com)
Research Mathematician
Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: strange behaviour of color property in function graphics
Next Topic: Implicit print bug in IDL 8.4?

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

Current Time: Wed Oct 08 13:52:11 PDT 2025

Total time taken to generate the page: 0.00556 seconds