> what is or isn't dynamic about it. 
> what about individual object properties such as long-strings
> which themselves are dynamic.   Can a dynamic
> array deal safely with objects that hold dynamic properties 
> or variables by themselves or do I have to deal with this in
> another way?

Well, your use of the term "dynamic" is being applied to the wrong end there
Robert.  Dynamic arrays and strings are dynamic in that they themselves can
be sized and resized dynamically on the fly at runtime, NOT because they
take on any care or concern about what's contained within them.

TObjectList on the other hand is specifically for maintaining a list of
"owned" objects, which of course comes with it the addition of being able to
assume more duties for you when you wish to destroy that object.

But you shouldn't confuse TObjectList's ability to handle this for you as
the default way things are done.  In fact, it's made must simplier because
of Delphi's "object-based hierarchy" where there is a master ancestor class.
But this is an extension, and a good one, I've never used such a class
myself before preferring to to retain "pilot in command" status for myself,
but remember the concept of "container" doesn't intrinsically include the
concept of "owner."  This was simply an natural OOP evolution.  


Let me also suggest again this is another example of how allowing a language
to "hide" scary things like pointers fails us all.  If Delphi made it plain
that your array was simply holding references to other objects you'd also
clearly see the distinction between the elements and objects involved.  It'd
be right there in the language.  I'm all for making things simple, but
there's enough the compiler does I depend on and don't want to know about,
but "references to other things" is a primative concept that will not go
away.



> From what I gathered simple dynamic arrays can be looked at like

They should be looked at like arrays.  They're dynamic in that you can
allocate and deallocate them at runtime, otherwise, they have no other
special properties, they are arrays.



Jim


------------------------------------------------------------------------
 Jim Burns, <mailto:[EMAIL PROTECTED]>
   Technology Dynamics
   Pearland, Texas  USA 
   281 485-0410 / 281 813-6939

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to