TStringlist: Re: I need some help please


  1. ilyapin

This archived discussion is "read only".



Top 1.   Apr 2, 2001 12:08 AM

» ilyapin - Re: I need some help please

In response to message posted by hugoparkinson:


Hi Hugo

>1. If I keep writing values to a TStringlist, what will it do if it runs
out
>of memory?
As far as I know a TStringList uses ReallocMem when expanding and therefore
it will raise EOutOfMemory exception

>Will it start using virtual memory, or just crash the program?
Of course Delphi memory menager uses system virtual memory but early or late
the program will run out of memory.

It's possible to capture the EOutOfMemory exception and try to save list to
disk file
But I must say it will not be easy to do because when you could not create
any more object or allocate memory while handling EOutOfMemory

Why not to limit the StringList growth to the fixed number of strings or a
fixed memory size?
May be a text file will better solve your problem?
If you need further help please let me have more information about your
project

>2. Is there a way to get the little panel telling you about the owner etc,
>that always appears with such applications as Word, at startup of my delphi
>program, only to quit and leave control to the main form?

May be they call it "a splash screen", but English is not the best of my
abilities.
You can create a new form in the main form OnCreate event hanler
show it
wait a little
close it
and then destroy it

Do not forget to call Application.Processmessages method in order to give
the form ability to redraw

It is good idea to place the pictures (if any) in DLL and load /unload DLL
dynamically in order to save memory


Fill free to contact me if you have questions

-- posted by ilyapin


Post this Discussion Post to facebook Add this Discussion Post to del.icio.us! Digg this Discussion Post furl this Discussion Post Add this Discussion Post to Reddit Add this Discussion Post to Technorati Add this Discussion Post to Newsvine Add this Discussion Post to Windows Live Add this Discussion Post to Yahoo Add this Discussion Post to StumbleUpon Add this Discussion Post to BlinkLists Add this Discussion Post to Spurl Add this Discussion Post to Google Add this Discussion Post to Ask Add this Discussion Post to Squidoo


Please follow the guidelines set forth in the Suite101 Posting Etiquette when adding to the discussion.


about us limelight blog writing jobs careers press room site map terms & conditions privacy policy suite101.de