Deleting Activities associated to a particular Category
I am trying to delete all the activities of a particular category. Following is whatI tried:
While the category gets removed or 'unregistered', the activities associated with the category remain and are visible in the dateArea.
I would like to know
How do I delete the activities of a Category? I tried something in the lines of
Activity actCurrent = (Activity)ActivityDepository.getInstance().getActivities();
Object oAllCatIDs = actCurrent.getCategoryIDs();
With the idea of trying to retreive the Category ID of each activity to delete it, but was not able to proceed further.
If an activity is linked to more than one Category, how can one remove a specific activity from a specific Category without disturbing the remaining structure of the ActivityDepository?
Performance Question: If activities/ Category's are only 'delinked' or 'unregistered', (in essence they still remain in memory), when and how can we clean up all dormant activities/ categories?
Else won't it hog the memory over time?
Thanks in advance.