开发者

Overloaded operator delete in dylib replaces system operator in OSX

开发者 https://www.devze.com 2023-03-22 09:17 出处:网络
I have a dylib written in C开发者_运维问答++ which has an overloaded operator new and delete. When a link my cocoa application with my dylib I have a BAD_ACCESS_ERROR because Cocoa tries to free memo

I have a dylib written in C开发者_运维问答++ which has an overloaded operator new and delete.

When a link my cocoa application with my dylib I have a BAD_ACCESS_ERROR because Cocoa tries to free memory with my operator delete from my dylib.

So I think that I can use the unexported_symbols_list options, but what is the decorated names for operator delete, delete[], new, new[], new(..)?


You can use the nm tool to extract the exported symbols from your lib and c++filt to demangle then and find which ones correspond to the mentioned operators.

0

精彩评论

暂无评论...
验证码 换一张
取 消