Re: Why Does My Program Slow Down?



On 13 Dec 2006 09:01:08 -0800, "jrodenhi" <jack@xxxxxxxxxxx> wrote:

Good idea!

The current inventory of existing objects part could be just the ticket
for finding the errant code. I'm thinking of making a descendant of
TObject called TMyObject, put the Create and Destroy code in my object
and then have all my objects descend from that. I would probably want
to also create a TMyStringList rather than trying to change the
ancestry of the standard one. This will involve a lot of search and
replace in my code. I wonder if there is a better way. Any thoughts?

You could 'outscope' the original TStringList code, Delphi uses the
last reference found in the Uses clause, so if all your tweaks are in
one unit (say jrutils.pas) you can simply make quite sure that that
unit is the last used in all Uses clauses.

To be honest I prefer to explicitly identify the location by:

SL := jrutils.TStringList.Create


.



Relevant Pages

  • Re: What are your favorite features?
    ... then would one be able to use any TObject descendant in the ... for..in loop, or would we still need to declare a TObject ... descendant TButtonList with a TButtonListEnumerator like ...
    (borland.public.delphi.non-technical)
  • Re: Using Webservice.Session
    ... >> TObject (Descendant?) ... Polymorphism is central to object-orientation. ... Wherever a TObject ... You can assign a string value ...
    (alt.comp.lang.borland-delphi)
  • Re: Using Webservice.Session
    ... > TObject (Descendant?) ... Wherever a TObject ... returns an TObject (or Nill) ... You can assign a string value ...
    (alt.comp.lang.borland-delphi)