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.

Dark GDK / dbDeleteImage - delete sprites first?

Author
Message
InsanitY
15
Years of Service
User Offline
Joined: 6th Aug 2009
Location: The Netherlands
Posted: 23rd Dec 2009 10:34
So, yeah.
When I use dbDeleteImage, should I first delete the sprites using that image, to prevent possible issues?
Or does dbDeleteImage already automatically delete the sprites that are using that image?

Thanks!
Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 23rd Dec 2009 18:38
I'd say best to delete sprites first. I don't think the images keep track of what sprites they're associated with. However, if the sprite routines are written well they should take into account the possibility of a missing image and deal with it.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office
InsanitY
15
Years of Service
User Offline
Joined: 6th Aug 2009
Location: The Netherlands
Posted: 23rd Dec 2009 19:03
Ok, thanks for the reply (:
I'll just delete the sprites first.
It probably doesn't really have any impact on performance unless I have to delete thousands of sprites, so actually it's no big deal.. but every 'optimization' helps, right?
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 26th Dec 2009 04:15
(Yes.. every optimization does help... though sometimes you need to add up a bunch of "little" optimizations to get the benefit.. but they are worth doing ... because if you never do them - no benefit!)

So - optimize or try to write code that isn't "DOGGY" and you should be good! (I'm not recommending you scour over ever couple lines of code to squeeze out as many clock cycles as possible... just every other couple of lines )

Lilith
16
Years of Service
User Offline
Joined: 12th Feb 2008
Location: Dallas, TX
Posted: 26th Dec 2009 04:48
Quote: "I'm not recommending you scour over ever couple lines of code to squeeze out as many clock cycles as possible... just every other couple of lines"


Twice.

Lilith, Night Butterfly
I'm not a programmer but I play one in the office

Login to post a reply

Server time is: 2024-10-01 20:17:44
Your offset time is: 2024-10-01 20:17:44