Quote:
Originally Posted by smithdale87
I wound up not using this code exactly as is.
Since I was downloading files from a server, I just updated the MD5 with each chunk of data that was received, this way I never have to waste the time of calculating the entire md5 of a huge file all at once.
Where are the files coming from in your situation?
|
Hmm, interesting. My files are coming from the internet, but they are downloaded at a different point in time. Maybe I could move the hash check back in time to the point of download. In this case, there are several files that make up a single object, so that object checks the hashes on all of the files before marking itself ready. In some cases, some file components might be 30-40MB videos.
Right now though, I'm not having a problem with the app consuming too much memory with the current implementation. It doesn't seem to take very long to calculate the hash, so I'm not too concerned. Its a background thing anyway. I was seeing memory shooting up over 30MB into danger land with your code above. Right now my app is stable at around 8MB.