Can I determine the order in which my units have been initialized?

后端 未结 5 2061
长情又很酷
长情又很酷 2020-12-10 03:37

I am hunting a bug which might be connected to unit initialization order. Is there a way to see which initialization section was executed when? I need to know t

5条回答
  •  抹茶落季
    2020-12-10 04:40

    You might check out the unit System and SysInit and look for the procedure InitUnits. Here you see that every module compiled with Delphi has a list of units initialization and finalization pointers. Using those plus a map file might give you the exact initialization order, but it will take some pointer hackery.

提交回复
热议问题