2

I found https://github.com/rs/SDWebImage and https://github.com/markofjohnson/HJCache Both good approach for image async download and caching on disk and memory. Is there something similar but supporting ARC?

JOM
  • 8,139
  • 6
  • 78
  • 111
Emanuele Fumagalli
  • 1,476
  • 2
  • 19
  • 31
  • 1
    Did you try MKNetworkKit? http://github.com/MugunthKumar/MKNetworkKit ARC based networking + caching framework. – Mugunth Jan 31 '12 at 03:34
  • That looks exactly what I needed, I'm using AFNEtworking and SDWebImage now, but both no ARC (not really a problem) but separated. SDWebImage doesn't seem to consider cache sizing and network indicator is messed up. – Emanuele Fumagalli Jan 31 '12 at 08:39

2 Answers2

2

update: AFNetworking has added support to ARC. And for image caching, NSURLCache does disk caching since ios5, see here here

docno
  • 99
  • 5
2

You can use those libraries in an ARC project by setting the -fno-objc-arc flag on the class files from the library. See this answer for instructions:

How can I disable ARC for a single file in a project?

ARC code can interoperate with ARC code without compromising the benefits to the code that your write yourself. ARC doesn't do anything magic except write your retain/release statements for you, so as long as SDWebImage doesn't have leaks, there's no benefit to converting it to ARC since the retain/release statements have already been written.

Community
  • 1
  • 1
Nick Lockwood
  • 40,865
  • 11
  • 112
  • 103
  • Thanks, this is what I do with AFNetworking, I was just hoping there was something new. Those frameworks are really good but I'd prefer SDK to take care of memory management. – Emanuele Fumagalli Jan 14 '12 at 11:13