Outdooractive / route-me

Open source map library for iOS
Other
122 stars 400 forks source link

Side effect of imageWithData creates CGColorSpaceRef which is not released IOS 6 only #121

Open tagcat opened 11 years ago

tagcat commented 11 years ago

Based on analysis with Instruments in IOS6.0.1, The number of Malloc 1kb object keeps growing, of the type colour_space_createindexed. Instruments indicate there source is In RMAbstractWebMapSource image = [UIImage imageWithData:tileData]. However, I have noticed the same behaviour with other imageWithData (RMDatabaseCache). This symptom is not visible in IOS 5.2, making me thinks its a bug in 6.

tagcat commented 11 years ago

Just tested with 6.1 seed 4 with iphone simulator 6.1. Problem still persists.

tagcat commented 11 years ago

Can anybody else confirm that what I am seeing is real !! Have tested with MarkerMurder sample app on latest Xcode, and released 6.1 on an ipad4. When you do a lot of panning/zooming both number of CFData and Malloc 1.00kb objects grow fast. GC deletes extras DFData's, but growing number of Malloc 1.00kb object in form of color_space_create_indexed remain. If this is real, it is a serious memory eater.