DLL memory manager mixup

后端 未结 3 1694
清歌不尽
清歌不尽 2020-12-21 13:09

I wrote an application which allows people to contribute plugins to extend the functionality. Such plugins are deployed as DLL files, which the framework picks up during run

3条回答
  •  [愿得一人]
    2020-12-21 13:32

    If the DLL code is responsible for allocating objects, it should also be responsible for freeing them. I think your problem is more with the reference counting and the "delete this". If you want to go that route, why not simply implemnt the objects as COM objects? This is after all one of the main problems that COM was designed to solve!

提交回复
热议问题