LoginSignup
4
4

More than 5 years have passed since last update.

原因不明のImageIO png_malloc メモリリーク

Posted at

ただUIImageをimageWithContentsOfFileで読んで、UIImageViewにぶちこんだだけなのに、Instrumentsに注意されている。「リークしてるぞゴルァ!」と。
どうも1枚ロードするごとに、
Malloc 7.00 KB imageIO png_malloc
と出てくる。

調べてみるとどうやら特定pngファイルの時だけ発生するようだ。リークが起きるpngをツールで出力しなおすとどうやら大丈夫なようだ。
おそらくリークは内部フレームワークのもので、意図しないデータやヘッダ等のせいでpngのロード時に解放漏れがあったのだろう。
リソースを疑ってみるのも必要なのだと痛感いたしました。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4