Marc Weustink wroteIf your code requires a specific unload order, code it that way by setting the variables to nil in the order you need. That is the only way you can make sure that interfaces will be unloaded in the correct order.
Even then you cannot do that, as has been mentioned multiple times in this thread: there may still be temporary "copies" of these interfaces around that were created by the compiler. I think the decision made by the company
Graeme Geldenhuys wrote 6 lines
I didn't mean to say such a patch would not be accepted, more that I'm not willing to write it (regardless how much I'd be paid), and that even if it were changed in the compiler that it could easily become Delphi-incompatible again in the future (because of newly added optimisations to FPC, or because of temporarily disabled optimisations in case of a rewrite/refactoring), or in some scenario not tested by the submitter (since there are no specifications).
I think that if you write code that depends on compiler-specific code generation details, that the best solution is to keep using that specific compiler (or even compiler version, if you care about predictable stability).
Jonas
