P. Sherman
P. Sherman

Reputation: 135

Java Card: Are objects still in memory after applet deletion?

Assume i want to delete a package with its applets from a card. Is the eeprom-memory that was used by the objects in the applet then free again?

Or do you have to take care of that by yourself (e.g. by calling requestObjectDeletion() in the uninstall method)?

Upvotes: 1

Views: 390

Answers (3)

grace
grace

Reputation: 51

FYI, I used FeiTian IFD A40CR card and JCOP card, they all can free the memory automatically.

I can not add the comment, so fogive me for posting it here.

Upvotes: 3

Maarten Bodewes
Maarten Bodewes

Reputation: 93948

No, generally the memory is freed if you delete the instances, although I don't think it is an actual requirement in the Java Card specifications (as having a garbage collector isn't a requirement either). Manual deletion should not make much sense. To be sure it could be a good idea to reset the card though (as garbage collection may only happen during startup).

Upvotes: 3

andy007
andy007

Reputation: 248

Normally, for most cards, if you remove the package from your card, the card will free the memory automatically by garbage collector. But it is not the essential function for all the cards.

That is, if the cards doesn't implement the function, you should do it yourself. Hope it helps.

Upvotes: 3

Related Questions