BlitzMax uses a garbage collector. This means that when a resource (object you've created, picture you've loaded, whatever) is no longer reachable (there's no way to get to it any more) it will automatically be released and the memory freed.
When the program itself closes all references are removed by the OS and will be freed. However ass Bill mentioned, not all referenced code elements (libs, dlls, etc.) will be guaranteed to be cleaned up in this fashion. Some may be retained by the OS, or another program etc. This behavior varies by OS and what's you're referencing, so always make sure when you're using something outside of bmax's scope you're polite about cleaning up after yourself. You're unlikely to cause any major problems unless the external reference has it's own problems to begin with, but it makes the world a better place :0)
In addition to tools to patch in an icon, or an IDE that will compile it in for you, you can also build your own icon resource and import it in your app. The disadvantage of this is it's annoying (check around the forums for a guide), however on the upside once you've imported the icon it's there every time you build, and it can be compiled in within the standard IDE or custom IDE's, and if you get into cross compiling you can also build the windows executable on another platform including it's icon. If you go a bit further you can also include other bundle information in the resource such as version info, copywrite, etc.
Also on the subject of other platforms. Each OS has it's own method for handling icons (in the same way they have their own executable formats etc.) so the icon process is different on each.
|