Einzelnen Beitrag anzeigen

Kas Ob.
Online

Registriert seit: 3. Sep 2023
214 Beiträge
 
#2

AW: Arraydaten im Debugger anzeigen

  Alt 24. Okt 2023, 15:34
There is no problem in this screenshots, everything is fine.

That junk is from uninitialized values, eg. when you set the length of an array to lets say 10 then it will receive un-zeroed memory from the memory manager (could be recycled and previously used by something like a TBitmap), so what ever was there it will stay there until been written on, so unless you fill it with data the data inside it will be junk from your prospective but it is just residue.

The Chinese chars are from the junk of data because the uninitialized strings might have a value that land on valid and accessible memory showing arbitrary lengths and content.

To be on safe side you can/should zero such arrays with managed types before start to fill them.
  Mit Zitat antworten Zitat