i getting memory leak during migration using realm (v1.0.2). code looks that:
let config = realm.configuration( schemaversion: 1, migrationblock: { migration, oldschemaversion in // haven’t migrated yet, oldschemaversion == 0 if (oldschemaversion < 1) { migration.enumerate(myclassrealm.classname(), { (oldobject, newobject) in newobject!["remoteid"] = 0 newobject!["deleted"] = false newobject!["dirty"] = true newobject!["updated"] = 0 }) } }) // tell realm use new configuration object default realm realm.configuration.defaultconfiguration = config // we've told realm how handle schema change, opening file // automatically perform migration { let _ = try realm() } catch { tslog.error(error nserror) }
do have idea wrong?
it's difficult tell without symbols intermediate frames of stack trace, suspect you're running realm cocoa issue #2933, appears memory leak due bug in swift's runtime libraries.
Comments
Post a Comment