Swift
ARCでは、いずれかがメモリから削除されているときに呼び出してdeinit
いますが、メモリから削除されたUIViewController
場合は呼び出されませんUIView
。
例えば
UIViewController
クラスdeinit
がうまく機能している場合
class MusicPlayerUIViewController: UIViewController,UITableViewDelegate,UITableViewDataSource
{
deinit
{
APP_DELEGATE.RemovePlayerContents()
}
}
ただし、UIView
クラスが機能しdeinit
ない場合
class MusicPlayerView: UIView,UITableViewDelegate,UITableViewDataSource
{
deinit
{
APP_DELEGATE.RemovePlayerContents()
}
}
何か案が 。