Solved

Listview occupies so much memory

Posted on 2002-07-02
3
198 Views
Last Modified: 2010-04-04
I have one application in which includes 1 listbox and 3 listview

listbox includes 3000 items
listview #1 includes 600 items

listview #2,3 are dynamically added.

When the amount of items in listview #2,3 is over 600,

My application is always down.

Does listview occupy so much memory?

Can any one help me
0
Comment
Question by:wangzheng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 14

Expert Comment

by:DragonSlayer
ID: 7126017
try a virtual listview
0
 
LVL 11

Expert Comment

by:robert_marquardt
ID: 7126338
0
 
LVL 7

Accepted Solution

by:
Cynna earned 100 total points
ID: 7127475
In addition (if you insist on staying with sluggish ListView) you might try (combination of) these tricks:

1. Set BeginUpdate when updating list:

ListView1.Items.BeginUpdate;
  // ... add items to the list...
ListView1.Items.EndUpdate;


2. Set the ViewStyle to vsList when adding items. When finished, set it back to your style.

3. Set SortType to stNone before adding items.

4. Predefine list max size, using AllocBy (see help under LV properties)




0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question