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

Home » Public Forums » archive » IDL object copying
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
IDL object copying [message #77097] Wed, 27 July 2011 22:49
Matt Francis is currently offline  Matt Francis
Messages: 94
Registered: May 2010
Member
IDL seems to have an unexpected behaviour when dealing with custom
objects.

If I have an object, say obj1 and I then say:

obj2 = obj1

I would expect to create a copy of obj1. Any changes to members of
obj2 I made through its methods should not change obj1, but that it
not what I find. In fact any changes made to one changes the other.

Looking at the details of the two variables we have (note that the
class of the object is called DATETIME)

OBJ1 OBJREF = <ObjHeapVar829(DATETIME)>
OBJ2 OBJREF = <ObjHeapVar829(DATETIME)>

IDL has decided that both of these are in fact pointers to the same
heap memory, rather than being different instances of the same class,
without their own heap memory. This is bad design; it is not the
expected behaviour of the assignment operator, and IDL provides no
mechanism to distinguish copy construction from assignment!

Can anyone suggest a workaround? I am in the midst of re-writing an
IDL code using custom objects (I am C++ developer by preference) and
am starting to realise the severe limitations of IDL's object
implementation!
[Message index]
 
Read Message
Previous Topic: IDL object copying
Next Topic: Re: IDL object copying

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

Current Time: Wed Oct 08 19:58:00 PDT 2025

Total time taken to generate the page: 0.00370 seconds