You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been giving APTimeZones a tryout. Along with the wrong TZ errors that others have reported for many US locations, I was running into a problem with a crash because of memory being released if I tried to look up more than one location. The problem seems to be that the timeZonesDB property in APTimeZones is not retained and was getting released between lookups.
In the importDataBaseFromFile method, the DB array is created using
Also, it looks to me like there is another potential memory bug in the APTimeZones class in the closesZoneInfoWithLocation method. Memory for a zoneLocation object is allocated every time through the loop,
APTimeZones requires ARC, and seems to be your are not using it. Just switch it to use ARC, and you will get rid of all crashes and memory issues. I will update the documentation to point on this.
Ah, that makes sense, and also explains some other oddities that I ran into elsewhere in the APTimeZones class. And as it was, I later realized I was putting that retain I added in the wrong place.
I've been giving APTimeZones a tryout. Along with the wrong TZ errors that others have reported for many US locations, I was running into a problem with a crash because of memory being released if I tried to look up more than one location. The problem seems to be that the timeZonesDB property in APTimeZones is not retained and was getting released between lookups.
In the importDataBaseFromFile method, the DB array is created using
I fixed the crashing problem by changing that to
Also, it looks to me like there is another potential memory bug in the APTimeZones class in the closesZoneInfoWithLocation method. Memory for a zoneLocation object is allocated every time through the loop,
but is never released.
The text was updated successfully, but these errors were encountered: