Einzelnen Beitrag anzeigen

Nixsager

Registriert seit: 15. Aug 2012
13 Beiträge
 
Delphi 7 Personal
 
#7

AW: TStringGrid-Dateninhalt wirklich darauf zugreifen/löschen

  Alt 4. Mär 2021, 11:16
Lösung:
https://www.delphipraxis.net/1484286-post4.html
Ist zwar nicht das gewünschte, aber ein anderer Ansatz.

So wie ich das jetzt verstanden habe, macht TStringGrid nur sinn, wenn es sämtliche Daten beinhaltet. Ansonsten sollte man eine große Bogen um TStringGrid machen.

@Daniel
Danke für den Hinweis.

@Daniel & Blup
Zu TDrawGrid:
So ähnlich dachte ich es auch. Aber für mich scheint es, das TListView die bessere Alternative ist, da bei TDrawGrid es wohl komplitierter ist.

@Blup
Dem eigenen Speichermanager muss man wohl unter die Arme greifen.
Bei einem kleinen Test mit SetLength, wurde zwar der genutze Speicher für das Programm kleiner, aber der reservierte Speicher nicht. Wenn ich ein Datenfeld mit SetLength mehrmal vergrößere und verkleinere, kriege ich schnell die Meldung, das kein Speicher mehr frei ist, obwohl ich vom System noch Reserven habe, und das Programm selbst nicht mehr als 2 GB Speicher braucht.

@Daniel
Den Speicherverbrauch von meinem Programm lasse ich mir von einer Erweitungung für Total Commander anzeigen. Damit kann ich auch teilweis die Komponennten von dem Programm bearbeiten.
Das sieht dann folgerndermaßen aus:
Code:
Module --------------------------| ListView.exe
Full name -----------------------| C:\Program Files (x86)\Programm\Delphi7\Projects\ListView\ListView.exe
File version --------------------| N/A
File description ----------------| N/A
Copyright -----------------------| N/A

PID -----------------------------| 00000D4C
Parent PID ----------------------| 000007D4  (C:\Program Files (x86)\Programm\Delphi7\Bin\delphi32.exe)
Priority ------------------------| 8
Threads -------------------------| 1
HandleCount ---------------------| 91


Created at ----------------------| 12:20:05.785   (04.03.2021)
UserTime ------------------------| 00:00:00.000
KernelTime ----------------------| 00:00:00.031

GDI objects ---------------------| 35
USER objects --------------------| 32

Working Set: --------------------| 9 895 936 Bytes
Working Set Peak: ---------------| 9 895 936 Bytes
Virtual: ------------------------| 112 033 792 Bytes
Virtual Peek: -------------------| 112 050 176 Bytes
Page File: ----------------------| 4 476 928 Bytes
Page File Peak: -----------------| 4 485 120 Bytes
Page Fault Count PerSec: --------| 2697
Quota Paged Pool: ---------------| 219 616 Bytes
Quota Paged Pool Peak: ----------| 220 256 Bytes
Quota NonPaged Pool: ------------| 13 088 Bytes
Quota NonPaged PoolPeak: --------| 13 568 Bytes


   ModuleName        BaseOfDll  SizeOfImage  EntryPoint   Full ModuleName
--------------------------------------------------------------------------------
   ListView.exe    |  00400000  |  00079000  |  004631A4  |  C:\Program Files (x86)\Programm\Delphi7\Projects\ListView\ListView.exe
   ntdll.dll       |  775B0000  |  00180000  |  00000000  |  C:\Windows\SysWOW64\ntdll.dll
   kernel32.dll    |  76A20000  |  00110000  |  76A33356  |  C:\Windows\syswow64\kernel32.dll
   KERNELBASE.dll  |  74C60000  |  00047000  |  74C67541  |  C:\Windows\syswow64\KERNELBASE.dll
   user32.dll      |  76DE0000  |  00100000  |  76DFB6FD |  C:\Windows\syswow64\user32.dll
   GDI32.dll       |  75A10000  |  00090000  |  75A2633B |  C:\Windows\syswow64\GDI32.dll
   LPK.dll         |  75390000  |  0000A000  |  753936A0  |  C:\Windows\syswow64\LPK.dll
   USP10.dll       |  74E50000  |  0009D000  |  74E8474C |  C:\Windows\syswow64\USP10.dll
   msvcrt.dll      |  74D80000  |  000AC000  |  74D8A472  |  C:\Windows\syswow64\msvcrt.dll
   ADVAPI32.dll    |  76CE0000  |  000A1000  |  76CF4919  |  C:\Windows\syswow64\ADVAPI32.dll
   sechost.dll     |  771B0000  |  00019000  |  771B4975  |  C:\Windows\SysWOW64\sechost.dll
   RPCRT4.dll      |  75090000  |  000F0000  |  750A0569  |  C:\Windows\syswow64\RPCRT4.dll
   SspiCli.dll     |  74B00000  |  00060000  |  74B1A3B0  |  C:\Windows\syswow64\SspiCli.dll
   CRYPTBASE.dll   |  74AF0000  |  0000C000  |  74AF10E1  |  C:\Windows\syswow64\CRYPTBASE.dll
   oleaut32.dll    |  75300000  |  0008F000  |  75303FB1  |  C:\Windows\syswow64\oleaut32.dll
   ole32.dll       |  76EE0000  |  0015D000  |  76F2B9C5  |  C:\Windows\syswow64\ole32.dll
   version.dll     |  75620000  |  00009000  |  75621220  |  C:\Windows\system32\version.dll
   comctl32.dll    |  70350000  |  00084000  |  703519A9  |  C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18837_none_ec86b8d6858ec0bc\comctl32.dll
   apphelp.dll     |  703E0000  |  0004C000  |  703E2C14  |  C:\Windows\system32\apphelp.dll
   AcLayers.dll    |  6A740000  |  0008D000  |  6A741FFF |  C:\Windows\AppPatch\AcLayers.dll
   SHELL32.dll     |  75AA0000  |  00C4C000  |  75B214C1  |  C:\Windows\syswow64\SHELL32.dll
   SHLWAPI.dll     |  766F0000  |  00057000  |  76709BA6  |  C:\Windows\syswow64\SHLWAPI.dll
   USERENV.dll     |  769A0000  |  00017000  |  769A1C9D |  C:\Windows\syswow64\USERENV.dll
   profapi.dll     |  76750000  |  0000B000  |  76751992  |  C:\Windows\syswow64\profapi.dll
   WINSPOOL.DRV    |  714D0000  |  00051000  |  714F988C |  C:\Windows\system32\WINSPOOL.DRV
   MPR.dll         |  73CF0000  |  00012000  |  73CF1200  |  C:\Windows\system32\MPR.dll
   AcGenral.DLL    |  6A010000  |  00219000  |  6A01221F |  C:\Windows\AppPatch\AcGenral.DLL
   UxTheme.dll     |  73BD0000  |  00080000  |  73BE37C9  |  C:\Windows\system32\UxTheme.dll
   WINMM.dll       |  70AC0000  |  00032000  |  70AC37F1  |  C:\Windows\system32\WINMM.dll
   samcli.dll      |  70590000  |  0000F000  |  7059125E |  C:\Windows\system32\samcli.dll
   MSACM32.dll     |  6A800000  |  00014000  |  6A801340  |  C:\Windows\system32\MSACM32.dll
   sfc.dll         |  6CD80000  |  00003000  |  00000000  |  C:\Windows\system32\sfc.dll
   sfc_os.DLL      |  6CD20000  |  0000D000  |  6CD21392  |  C:\Windows\system32\sfc_os.DLL
   dwmapi.dll      |  758A0000  |  00013000  |  758A1858  |  C:\Windows\system32\dwmapi.dll
   SETUPAPI.dll    |  74EF0000  |  0019D000  |  74EF17E7  |  C:\Windows\syswow64\SETUPAPI.dll
   CFGMGR32.dll    |  74C30000  |  00027000  |  74C358B9  |  C:\Windows\syswow64\CFGMGR32.dll
   DEVOBJ.dll      |  74B80000  |  00012000  |  74B81441  |  C:\Windows\syswow64\DEVOBJ.dll
   urlmon.dll      |  76B50000  |  0014B000  |  76B52B50  |  C:\Windows\syswow64\urlmon.dll
   api-ms-win-downlevel-ole32-l1-1-0.dll |  74E30000  |  00004000  |  00000000  |  C:\Windows\syswow64\api-ms-win-downlevel-ole32-l1-1-0.dll
   api-ms-win-downlevel-shlwapi-l1-1-0.dll |  752E0000  |  00004000  |  00000000  |  C:\Windows\syswow64\api-ms-win-downlevel-shlwapi-l1-1-0.dll
   api-ms-win-downlevel-advapi32-l1-1-0.dll |  74B70000  |  00005000  |  00000000  |  C:\Windows\syswow64\api-ms-win-downlevel-advapi32-l1-1-0.dll
   api-ms-win-downlevel-user32-l1-1-0.dll |  75A00000  |  00004000  |  00000000  |  C:\Windows\syswow64\api-ms-win-downlevel-user32-l1-1-0.dll
   api-ms-win-downlevel-version-l1-1-0.dll |  752F0000  |  00004000  |  00000000  |  C:\Windows\syswow64\api-ms-win-downlevel-version-l1-1-0.dll
   api-ms-win-downlevel-normaliz-l1-1-0.dll |  76B40000  |  00003000  |  00000000  |  C:\Windows\syswow64\api-ms-win-downlevel-normaliz-l1-1-0.dll
   normaliz.DLL    |  74B60000  |  00003000  |  00000000  |  C:\Windows\syswow64\normaliz.DLL
   iertutil.dll    |  76760000  |  00232000  |  76763B90  |  C:\Windows\syswow64\iertutil.dll
   WININET.dll     |  753A0000  |  0020D000  |  753A2A70  |  C:\Windows\syswow64\WININET.dll
   AcXtrnal.DLL    |  65250000  |  00259000  |  65268219  |  C:\Windows\AppPatch\AcXtrnal.DLL
   SHUNIMPL.DLL    |  6A7F0000  |  00006000  |  6A7F1093  |  C:\Windows\system32\SHUNIMPL.DLL
   SortServer2003Compat.dll |  6A7E0000  |  0000D000  |  6A7E7C69  |  C:\Windows\system32\SortServer2003Compat.dll
   IMM32.DLL       |  769C0000  |  00060000  |  769D158F |  C:\Windows\system32\IMM32.DLL
   MSCTF.dll       |  74CB0000  |  000CD000  |  74CB168B |  C:\Windows\syswow64\MSCTF.dll
   CLBCatQ.DLL     |  77040000  |  00083000  |  770423D2  |  C:\Windows\syswow64\CLBCatQ.DLL
   SpTip.dll       |  73C70000  |  00022000  |  73C872EE |  C:\Windows\IME\SpTip.dll
GPL = Greatest Pest License !!!

Geändert von Nixsager ( 4. Mär 2021 um 11:52 Uhr)
  Mit Zitat antworten Zitat