Re: D7 Compiler Bug

From: Rob Kennedy (me3_at_privacy.net)
Date: 09/30/04


Date: Thu, 30 Sep 2004 12:36:20 -0500

Jamie wrote:
> not if your dealing with Records.

He's not dealing with records. He's dealing with old-style objects.

> you really should be using shortstrings
> for those events when you move data out to
> memory or file in a while record.

No one said anything about moving anything anywhere. And what's a while
record?

> i use short strings when ever possible for
> speed

You obviously don't use Delphi 5 or later.

> and less dynamic heap fragmentation.
> one's app could get a periodic memory
> error if using lots of dynamic strings that
> are getting reallocated all the time .
> even though over all memory will report
> being sufficient.
> so it maybe a good thing to keep in mind.

OK, let's forget about strings. In Dodi's original example, change the
object's string field to be a dynamic array, an interface reference, a
WideString, or a Variant, and then change the assertion test
accordingly. The assertion will fail. The problem is not limited to strings.

-- 
Rob


Relevant Pages

  • Re: D7 Compiler Bug
    ... > not if your dealing with Records. ... > memory or file in a while record. ... > error if using lots of dynamic strings that ... amount of memory needed instead of an amount bein either too large or too ...
    (comp.lang.pascal.delphi.misc)
  • Re: Get/Put read/write efficiency
    ... you can just append data but if you want to insert into ... build the file in memory then write the whole thing in one go. ... Also if you are dealing with large strings you'll find building the strings ...
    (microsoft.public.vb.general.discussion)
  • Re: .NET SUCKS --- READ FOLLOWING. MICROSOFT IS A SUCKY CO
    ... > system just doesn't cut it in high memory load situations. ... Garbage Collection is not an excuse for poor memory management. ... One excellent example is the use of strings. ... because many "professional" programmers know very little about what is ...
    (microsoft.public.dotnet.framework)
  • Re: Secure Credentials pwd handling
    ... strings that are produced when you read the properties. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... so at some point the value will be in memory. ... SecureString is added to .NET to support this use case. ...
    (microsoft.public.dotnet.security)
  • Re: CStrings and memory
    ... Then you allocate a few more strings ... Now you need to allocate another string, but there is no more memory. ... In addition to strings, there are other things that get allocated: ... have perhaps confused "address space" with "working set". ...
    (microsoft.public.vc.mfc)