DLL memory manager mixup

后端 未结 3 1707
清歌不尽
清歌不尽 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:25

    There are two solutions. Solution one is "share more" - you can move new/delete across DLL boundaries if both sides use the same CRT DLL (/MD or /MDd in MSVC). Solution two is "share less" - let each DLL have its own C++ heap, and do not split new/delete across DLL boundaries.

提交回复
热议问题