While going through with my StreamRadio clean up, I noticed that when using the Station Finder, icons are downloaded for all stations on the list (at least only one icon is downloaded at a time).
Besides the fact that Station Finder will essentially download any station icons without regard for your RAM, there is another big problem with this:
Once you close the Station Finder window, all the memory absorbed from the downloaded station icons are not freed, and worse, these downloaded images are not reused for separate searches that find the same stations. The BBitmap memory is at least “freed” when the main window is closed and the StreamRadio application quits, however, I don’t know is the corresponding ServerBitmaps within the app_server are also being freed...
How:
The StationFinderRadioNetwork class and the StationFinder class will need to be reworked. Maybe a HashMap could be formed between a station’s unique identifier and the station’s icon to be able to reuse icons?
What:
While going through with my StreamRadio clean up, I noticed that when using the Station Finder, icons are downloaded for all stations on the list (at least only one icon is downloaded at a time).
Besides the fact that Station Finder will essentially download any station icons without regard for your RAM, there is another big problem with this: Once you close the Station Finder window, all the memory absorbed from the downloaded station icons are not freed, and worse, these downloaded images are not reused for separate searches that find the same stations. The BBitmap memory is at least “freed” when the main window is closed and the StreamRadio application quits, however, I don’t know is the corresponding ServerBitmaps within the app_server are also being freed...
How:
The StationFinderRadioNetwork class and the StationFinder class will need to be reworked. Maybe a HashMap could be formed between a station’s unique identifier and the station’s icon to be able to reuse icons?