You're not missing anything AFAIK. Android is missing an onDestroy()
(or the equivalent) for ContentProvider
. There isn't even anything in the source code in this area that suggests there is some sort of onDestroy()
that just isn't surfaced in the SDK.
If you look at the source code for AlarmProvider
and LauncherProvider
, they even create database objects on a per-API-call basis (e.g., every time they get insert()
, they open a writable database handle that they never close).
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…