Cleanup of persistent objects

When an app is removed from a BlackBerry smartphone, persistent objects that are defined within the app are automatically deleted. This is because each persistent object has a class type that is defined in the app. When the app is removed the class type is deleted, so the persistent objects are deleted.

To ensure cleanup of the persistent storage you use, you should always store your instances of your own classes or your own extensions of provided classes.

To delete individual data, treat the data as normal objects, and remove references to it. A garbage collection operation removes the data.

Was this information helpful? Send us your comments.