[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie Questions

Thanks for the help guys, got that problem fixed.  I'm hoping you can help
me with one more thing with IDL pointers.
When we do something like:

foo_ptr = ptr_new(foo)

foo_ptr points to a memory location in the heap memory that contains
foo's value, correct?  So, am I safe to assume it copys whatever the value of
foo is into the heap variable that foo_ptr is pointing too?
And, if we do:

bar_ptr = ptr_new(bar, /no_copy)

bar_ptr will now just point to the memory location where bar is stored
(not copy it to a heap location)?  We can then update the bar, or the
components of bar(if bar is a structure) by dereferencing bar_ptr, right?
For example:

*bar_ptr.name = 'Geoff'

Thanks for everyone's help.  I've only worked with pointers in
C/C++ before, and I'm getting the impression that these don't work exactly
the same way.  =)

Geoff Herbynchuk