Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Excessive memory use
Re: Excessive memory use [message #35660 is a reply to message #35657] |
Sun, 11 March 2012 15:27   |
Novo
Messages: 1430 Registered: December 2006
|
Ultimate Contributor |
|
|
IMHO, you need to call SetVirtualCount(). My app WordNet 3.0 browser is an example of using this technique. It is basically a database browser. I'm not sure that a table, I'm trying to scroll, has 150K rows, but it should be close to that. ArrayCtrl initialization code snippet is below.
warray.AddRowNumColumn("lemma", 80).SetConvert(*Number2Lexeme);
// Set count.
{
String sql;
Sql stmt(db_session);
sql = " SELECT max(wordid)";
sql << " FROM words";
stmt.SetStatement(sql);
stmt.RunX();
if (stmt.Fetch())
warray.SetVirtualCount(stmt[0]);
}
Regards,
Novo
|
|
|
Goto Forum:
Current Time: Wed Apr 30 20:28:47 CEST 2025
Total time taken to generate the page: 0.01020 seconds
|