Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
nz0
AGK Developer
17
Years of Service
User Offline
Joined: 13th Jun 2007
Location: Cheshire,UK
Posted: 17th Jan 2014 12:24
When I check for generated loaded image IDs (>10000) I don't see any that were used like:



I only see images that were loaded using loadImage()

What happens with this image resource? Is the image deleted when the sprite is deleted?

Markus
Valued Member
20
Years of Service
User Offline
Joined: 10th Apr 2004
Location: Germany
Posted: 17th Jan 2014 23:04 Edited at: 17th Jan 2014 23:08
this
CreateSprite(LoadImage("myimage.png"))
the image should be free at your programm end but
its not a good technic like this.

for unique images you should replace by
spr=LoadSprite("myimage.png")

or
img=LoadImage("myimage.png")
spr1=CreateSprite(img)
spr2=CreateSprite(img) //if you need again for other sprite

also look at benchmark commands.

AGK 108 (B)19 : Windows 8.1 Pro 64 Bit : AMD Radeon HD 6670

Login to post a reply

Server time is: 2024-11-25 02:51:10
Your offset time is: 2024-11-25 02:51:10