Ticket UUID: | 6d4319309e906144741e49f8790647b2dffb452a | |||
Title: | Parent-Class destructor not invoked with same class-name in different namespace | |||
Type: | Bug | Version: | Itcl 4.3.2 | |
Submitter: | anonymous | Created on: | 2025-02-12 22:37:45 | |
Subsystem: | 10. Objects | Assigned To: | nobody | |
Priority: | 5 Medium | Severity: | Important | |
Status: | Closed | Last Modified: | 2025-02-20 13:04:29 | |
Resolution: | Fixed | Closed By: | sebres | |
Closed on: | 2025-02-20 13:04:29 | |||
Description: |
When a class is defined in a namespace and it inherits from a class with the same name from a different namespace and an object from the child class is destroyed, the destructor from the parent class does not get invoked. | |||
User Comments: |
sebres added on 2025-02-20 13:04:29:
Yes, my suspicion about simple name in hash table has been confirmed... sebres added on 2025-02-13 22:06:57: It seems to be solely Itcl (v.4) issue (thus the correct place for the ticket would be itcl/ticket). Below enclosed the PoC for tclOO (basis of Itcl since Itcl4), that works as expected:
Although in tclOO inherited destructor need to be invoked explicitly (using I guess, Itcl stores somewhere (hash table?) the chain of destructors by simple name (instead of its reference or fully-qualified name). |
Attachments:
- namespace-class-destructor.tcl [download] added by anonymous on 2025-02-12 22:40:03. [details]