Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory . .um . . at least I think that's what it was . .

Status
Not open for further replies.

Rodzo

Programmer
May 12, 2000
13
0
0
US
Hi<br><br>My current app is<br><br>63630 lines<br>1158312 bytes code<br>279884&nbsp;&nbsp;bytes data<br>16k initial stack<br><br>but it grabs at least 25 megs of ram as soon as it starts up.<br><br>I've checked all my new/dispose pairs and emptied the few ansistrings I use and I never touch pchars(the devil's work) and now I've run out of ideas.<br><br>If anyone could give me a clue I'd be pathetically grateful.<br><br>Rodzo<br><br>
 
Do you create your forms at runtime ?<br>If no, they are created when your app starts up.<br><br>Go to Project-Options-Forms and move as many forms to the right as possible.<br><br>Before you use one of these, you have to instantiate it:<br><br>uses UFindDialog;<br><br>procedure TFMain.FindBtnClick(..);<br>begin<br>&nbsp;&nbsp;FindDialog := TFindDialog.Create(Self);<br>&nbsp;&nbsp;try<br>&nbsp;&nbsp;&nbsp;&nbsp;// whatever you want to do with it, eg.<br>&nbsp;&nbsp;&nbsp;&nbsp;FindDialog.SetFindString('huga!');<br>&nbsp;&nbsp;&nbsp;&nbsp;FindDialog.ShowModal;<br><br>&nbsp;&nbsp;finally<br>&nbsp;&nbsp;&nbsp;&nbsp;FreeAndNil(FindDialog); // &lt;- don't forget !<br>&nbsp;&nbsp;end;<br>end;<br><br>Hope this helps !<br><br>Barnoid<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<br><br>&nbsp;&nbsp;
 
Barnoid<br><br>It never occurred to me before,<br>but I know you must be right<br><br>I've tried it since but it doesn't work <br>after the first couple of runs at it<br>and there's a scarcity of info in the <br>delphi help on the subject <br><br>I have to put out an upgrade every quarter <br>and that means I have to be mucho careful <br>about any changes I make(if it aint broke etc)<br><br>I thank you for the answer to <br>something that has been puzzling <br>me for a while<br><br>Anthony044@aol aka rodzo<br>
 
Unfortunately, Delphi applications are very big in size and can utilize a ton of memory depending on many different things. First of all is if you are using database connections. They tie up quite a bit of memory. I myself have many applications that tie up into the 20mb range and have actually taken the time to strip out all of the icons and images and database connections and they still take up a ton of memory. One problem is the VCL runtime packages that have to be compilied into the program and loaded into memory as well. I have not gotten with Borland on this but I am afraid it is just the way it is. Please let me know if you figure anything out.

Thanks

Brett Parkhurst [sig]<p>Brett Parkhurst<br><a href=mailto:brettparkhurst@uswest.net>brettparkhurst@uswest.net</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top