ObjectDeletion Sample
The sample generates seven APDU scripts that demonstrate the object deletion mechanism, applet deletion, and package deletion:
-
od1-1.scr- Demonstrates the object deletion mechanism and verifies that memory for objects referenced from transient memory of typeCLEAR_ON_DESELECTis reclaimed after an applet is deselected.od1-1.scrdoes not depend on any other sample. The final state ofcrefmemory must be saved to a file forod1-2.scrto use. -
od1-2.scr- Demonstrates the object deletion mechanism and verifies that memory for objects referenced from transient memory of typeCLEAR_ON_RESETis reclaimed after card reset.The
od1-2.scrsample must be run afterod1-1.scrbecause the initial state ofcrefmust be the same as its final state after runningod1-1.scr. After runningod1-2.scr, the final state ofcrefmust be saved to a file so thatod1-3.scrcan use it. -
od1-3.scr- Performs applet deletion, package deletion, and employs theAppletEvent.uninstallmethod to uninstall an applet. The sample verifies that all transient memory of typeCLEAR_ON_RESETandCLEAR_ON_DESELECTis returned to the memory manager. The sample also demonstrates the use of theAppletEvent.uninstall()method.The
od1-3.scrsample must be run afterod1-2.scrbecause the initial state ofcrefmust be the same as its final state after runningod1-2.scr. -
od2.scr- Demonstrates package deletion and checks that persistent memory is returned to the memory manager.After running
od2.scr, the final state ofcrefmust be saved to a file so thatod2-2.scrcan use it. -
od2-2.scr- Demonstrates shared reference applet deletion and package deletion order.The
od2-2.scrsample must be run afterod2.scr. This is because the initial state ofcrefmust be the same as its final state after runningod2.scr. -
od3.scr– Implements a scenario to capture initial memory.After running
od3.scr, the final state ofcrefmust be saved to a file so thatod3-2.scrcan use it. -
od3-2.scr- Implements a scenario to verify memory after package deletion.The
od3-2.scrsample must be run afterod3.scrbecause the initial state ofcrefmust be the same as its final state after runningod3.scr.
The simulator must be restarted before running each APDU script.
Follow one of these sets of instructions to run this sample: