ObjFW  View Ticket

Ticket UUID: b41fb588c5feaaa974417dbc0732c86e772e105a
Title: Call `+[unload]` when a shared library with classes gets unloaded
Status: Open Type: Enhancement
Severity: Minor Priority: Medium
Subsystem: runtime Resolution: Open
Last Modified: 2024-03-17 12:08:23
Version Found In: Milestone: none
User Comments:
js added on 2024-01-06 10:58:15: (text/x-markdown)
When a shared library gets unloaded, call `+[unload]` on all classes contained in that shared library. This will need a compiler change to not only create a constructor that calls into `__objc_exec_class` as is currently done, but also a destructor that calls into something like `__objc_unexec_class` (name TBD).

It's unclear if this is possible at all with the Apple runtime. It might be that this can only be made possible with the Apple runtime when using `OFPlugin`.