Overhead associated with OutputDebugString in rele

2020-02-09 01:53发布

Is there a significant overhead associated with calling OutputDebugString in release build?

7条回答
仙女界的扛把子
2楼-- · 2020-02-09 02:21

Never leave OutputDebugString() calls in a release build. Always either remove them by using #ifdef statements, or provide another switch to have them turned off.

If you leave them in, have them disabled by default and only activate them on request, because otherwise your app will make it hard to debug other apps which behave nice (i.e., only output debug data on request).

Theres DebugView to catch the output of apps, but of course that's only good if not every app chatters along for no good reason.

查看更多
登录 后发表回答