Antonio Bleile wrote:

> So I get the printf which is called inside the destructor AFTER the
> "delete....". Ok, you might say, that can happen....  But it should
> really be sequential. There should be just on thread....
> 
> Any Ideas?

That probably has to do with the synchronization of iostream vs stdio.

It can be fixed by either:

  1. calling std::cout << std::flush; between delete and printf().

  2. Calling std::ios_base::sync_with_stdio(true); during startup
       (this might have some performance overhead).

A sidenote on logging performance in Windows:

We've found that ostream to stdout/stderr is 20 times slower than 
fprintf or std::ofstream in our app. So, using std::cout/cerr/clog to 
write a lot of data to the console is a bad move on Windows. I don't 
know who or what to blame though (we don't use the sync-call).

Cheers,
/Marcus

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to