The security problem of nested classes
This paper mainly discusses the security problem of OO languages caused by the introduction of the nested class mechanism. Firstly, by analyzing various cases concerning about nested classes instances and their owner objects in detail, we illustrate the invalid owner problem arising from the differe...
Gespeichert in:
Veröffentlicht in: | SIGPLAN notices 2000-03, Vol.35 (3), p.34-38 |
---|---|
Hauptverfasser: | , , , |
Format: | Artikel |
Sprache: | eng |
Online-Zugang: | Volltext |
Tags: |
Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
|
Zusammenfassung: | This paper mainly discusses the security problem of OO languages caused by the introduction of the nested class mechanism. Firstly, by analyzing various cases concerning about nested classes instances and their owner objects in detail, we illustrate the invalid owner problem arising from the difference between the lifetime of nested class instances and their owner objects. Then a solution to solve this problem is presented. Finally, a conclusion is drawn that the nested class mechanism should be suitable for the languages in which user defined classes are only used to declare dynamically created objects and which have garbage collection support, such as Java, not for the languages in which classes are allowed to declare static objects or local objects and which have no garbage collection support, such as C++. |
---|---|
ISSN: | 0362-1340 1558-1160 |
DOI: | 10.1145/351159.351171 |