Author Topic: Gensprite() memory allocation  (Read 1218 times)

Offline r0ber7

  • Prof. Inline
  • *****
  • Posts: 550
    • View Profile
Gensprite() memory allocation
« on: 2012-Dec-03 »
Question...

I'm drawing a text balloon on screen. The balloon is variable in width and height depending on the size of the text. I'm using a CREATESCREEN & GENSPRITE combination to make fitting balloons for all messages. But once I've made them, and displayed them, I really have no more use for the sprites I created with GENSPRITE.

Where do they go? :)

I assume they keep hanging around in memory, which is not ideal. Is there a way to free sprite memory allocated through GENSPRITE? If not, I'll probably use a looping array of sprite IDs or something.

Offline Crivens

  • Prof. Inline
  • *****
  • Posts: 913
    • View Profile
Re: Gensprite() memory allocation
« Reply #1 on: 2012-Dec-03 »
LOADSPRITE "",spriteid should free memory.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Offline r0ber7

  • Prof. Inline
  • *****
  • Posts: 550
    • View Profile
Re: Gensprite() memory allocation
« Reply #2 on: 2012-Dec-03 »
Sweet! Thanks.  :good: