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 type CLEAR_ON_DESELECT is reclaimed after an applet is deselected.

    od1-1.scr does not depend on any other sample. The final state of cref memory must be saved to a file for od1-2.scr to use.

  • od1-2.scr - Demonstrates the object deletion mechanism and verifies that memory for objects referenced from transient memory of type CLEAR_ON_RESET is reclaimed after card reset.

    The od1-2.scr sample must be run after od1-1.scr because the initial state of cref must be the same as its final state after running od1-1.scr. After running od1-2.scr, the final state of cref must be saved to a file so that od1-3.scr can use it.

  • od1-3.scr - Performs applet deletion, package deletion, and employs the AppletEvent.uninstall method to uninstall an applet. The sample verifies that all transient memory of type CLEAR_ON_RESET and CLEAR_ON_DESELECT is returned to the memory manager. The sample also demonstrates the use of the AppletEvent.uninstall() method.

    The od1-3.scr sample must be run after od1-2.scr because the initial state of cref must be the same as its final state after running od1-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 of cref must be saved to a file so that od2-2.scr can use it.

  • od2-2.scr - Demonstrates shared reference applet deletion and package deletion order.

    The od2-2.scr sample must be run after od2.scr. This is because the initial state of cref must be the same as its final state after running od2.scr.

  • od3.scr – Implements a scenario to capture initial memory.

    After running od3.scr, the final state of cref must be saved to a file so that od3-2.scr can use it.

  • od3-2.scr - Implements a scenario to verify memory after package deletion.

    The od3-2.scr sample must be run after od3.scr because the initial state of cref must be the same as its final state after running od3.scr.

The simulator must be restarted before running each APDU script.

Follow one of these sets of instructions to run this sample: