Commit Graph

9 Commits

Author SHA1 Message Date
Garrett Moon
7c0b68cb29 Add comment to explain writing durations to file. 2016-04-19 15:31:42 -07:00
Garrett Moon
c8c4b5ace2 Address comments, fix warning. 2016-04-19 15:29:36 -07:00
Garrett Moon
f8d39a1985 Handle errors when writing files. 2016-04-19 15:01:37 -07:00
Garrett Moon
e6cf241648 Fix warning, passing in NULL instead of 0 2016-04-11 15:26:25 -07:00
Garrett Moon
9dd8ebf8da Better clearing of memory mapped files.
First, prevents a memory leak if users reference self in their PINAnimatedImage completions.

Second, this deletes decoded files when there are no more references to an animated image.
Previously we deleted on app open and exit.

I wasn't going to do this in case you closed a GIF and then reopened, but the more I
thought about it the cost is too high: A user can see their disk size balloon if they view
a bunch of GIFs and then check usage. They could also fill up their space enough while using
the app by viewing GIF after GIF that instability could result.
2016-04-11 13:20:58 -07:00
Garrett Moon
e3d2e07ae7 Addressing Rricky's comments 2016-04-08 16:26:04 -07:00
Garrett Moon
f10547d1c5 Fix for file cleanup / prevent crash if memoryMap is nil. 2016-04-08 10:55:06 -07:00
Garrett Moon
fc900b66d2 Cross platform fixes 2016-04-06 14:17:51 -07:00
Garrett Moon
5e2d20d36b Beta of PINAnimatedImage 2016-04-05 18:02:09 -07:00