ich habe mal eine Frage zu LoadImage():
Doumentation sagt zum Rückgabewert:
Es gibt ja diese zwei Möglichkeiten, ein Bild zu laden:Returns nonzero if the image was loaded successfully and zero if the image could not be loaded. If #PB_Any was specified as the #Image parameter then the auto-generated number is returned on success.
Code: Alles auswählen
;manuelle Vergabe
bla = 0;
If LoadImage(bla, "xyz.png") = 0 : error....
;automatische Vergabe
bla = LoadImage(#PB_Any, "xyz.png");
If bla = 0 : error....
Und irgendwann habe ich hier mal als Antwort bekommen, dass folgendes zu Speicherverschwendung führt:
Code: Alles auswählen
LoadImage(0, "xyz.png")
LoadImage(10000, "xyz2.png")
;Jetzt hat das PB-interne ID-Array 10000 Einträge, wovon nur 2 sinnvoll verwendet werden. 1-9999 sind leer.