5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

SwiftではCGColorSpaceReleaseなどを手動で呼んではいけない

Posted at

※ちょっと自信ありません。

Objective-CのソースからCoreGraphics系の処理を移植したら、関数を抜けるタイミングで何故かEXC_BAD_ACCESSが発生したのですが、どうやら手動でCGPathReleaseCGColorSpaceReleaseなどを呼んでいた部分が原因のようです。

どういうカラクリかはちょっと判りませんが、SwiftではCF Objectsは勝手にReleaseされるようになったようですね。
CGPathdeinitでreleaseしてるとかそんな感じなのかな?)

参考:

5
6
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
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?