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

Home » Public Forums » archive » Passing info and destroying widgets...
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: Passing info and destroying widgets... [message #16011 is a reply to message #15898] Tue, 22 June 1999 00:00 Go to previous messageGo to previous message
Martin Schultz is currently offline  Martin Schultz
Messages: 515
Registered: August 1997
Senior Member
Stein Vidar Hagfors Haugan wrote:
>
> [A very interesting article in a very interesting thread ...]
>
> The memory inefficiency is of course related to the fact that if
> you're not using pointers, you need to provide a copy of the data
> to the outside whenever the outside (user) needs to look at it,
> like this:
>
> IDL> data = obj->getdata()
> IDL> print,sigma(data)
>

Hmmm. To avoid that whole /NOCOPY thing, I would probably
store the data as a pointer within the object, so
obj->getdata()
would return the pointer anyway. No need to call
obj->setdata(pointer)
afterwards if you are not manipulating the data itself. Here, of course
one probably has to differentiate between Stein's three user types
again: don't trust a scientist! He/she is most likely to manipulate the
data and not tell the object about it. Hence, there should probably be a
obj->CheckIntegrity
method which retrieves type and dimensions of the data
before the objects accesses it (for plotting or whatever else).
Pun: you shouldn't call this method obj->IsInteger ;-)

Martin.

--

|||||||||||||||\\\\\\\\\\\\\-------------------///////////// //|||||||||||||||
Martin Schultz, DEAS, Harvard University, 29 Oxford St., Pierce 109,
Cambridge, MA 02138 phone (617) 496 8318 fax (617) 495 4551
e-mail mgs@io.harvard.edu web http://www-as/people/staff/mgs/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Screen printing
Next Topic: Indexing structures of different type

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

Current Time: Thu Oct 09 16:44:06 PDT 2025

Total time taken to generate the page: 0.72131 seconds