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

Home » Public Forums » archive » Re: object argument passing behaviour changed in v8.2.2?
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: object argument passing behaviour changed in v8.2.2? [message #84593] Mon, 21 October 2013 16:07 Go to previous message
chris_torrence@NOSPAM is currently offline  chris_torrence@NOSPAM
Messages: 528
Registered: March 2007
Senior Member
Hi Paul,

Nothing has changed with the way IDL passes objects. However, I'm a little confused by your code. When you say that the "compute_interpolation_frequency" procedure "allocates the resulting object", do you really mean that it just fills in some properties on that object? Because it looks like you are doing an obj_new on those objects before passing them in.

It looks like something strange is going on with garbage collection, where it is somehow freeing up your object inside compute_interpolation_frequency. However, I can't imagine why this would be happening. I just create a test program which approximates what you are doing:

pro test_pass_objelement, obj
obj->getproperty, name = name
obj->SetProperty, NAME='NewName'
end
o = objarr(5)
for i=0,4 do begin
o[i] = obj_new('IDLitComponent', NAME=STRTRIM(i,2))
test_pass_objelement, o[i]
print, obj_valid(o[i])
endfor
end

When I run this code (at least in IDL 8.3), the objects are all valid after the procedure call. Can you try running this code to make sure it passes for you? If it does, then maybe you can post the details of your compute_interpolation_frequency procedure, so we can diagnose what is happening inside
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How can I show error line numbers when running .sav on Virtual Machine
Next Topic: Using Minimum operator with NaN values

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

Current Time: Wed Oct 08 15:10:31 PDT 2025

Total time taken to generate the page: 0.00445 seconds