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

Home » Public Forums » archive » object memory management
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 memory management [message #63609 is a reply to message #63523] Wed, 12 November 2008 21:18 Go to previous messageGo to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
On Nov 12, 12:31 pm, Demitri wrote:
>
> Is this something that should be published in my class' API and the
> responsibility is passed to anyone using the function? It seems that
> calling OBJ_DESTROY will also destroy the objects within the container,
> and I may not want that. Should I ignore it and call HEAP_GC
> occasionally (*cough*hack!*cough*)? What is the IDL convention here?

This is exactly the same problem as, "who frees a pointer?" In a low
level language like C, this question makes sense to ask. But for a
high level language like IDL (or Python or Perl etc.), the
*interpreter* does the job for us. Why should we have to figure out
when an object or a pointer needs to be freed when the interpreter
knows *exactly* when? [ for example it can do its own reference
counting. ] Just think if we had to explicitly allocate and free
every variable. In my opinion, it's an area where RSI really dropped
the ball, and makes pointers/objects a lot less effective than they
could be.

Craig
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CW_FIELD question
Next Topic: Is there an easy way to write and read (large) structure?

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

Current Time: Fri Oct 10 03:38:40 PDT 2025

Total time taken to generate the page: 7.44298 seconds