If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
I've been messing around with server.cpp in the socket/server example in the codebase and came across a c++ syntax that just looked really strange to me.
I found this code in the constructor. Why would you delete something at the same time you create it? Is it that the function tells the m_text what it needs to do and then wxLogTextCtrl isn't needed anymore so delete it as soon as you use it? I've just never seen delete used in this way before so it's left me a bit curious and confused.
Ok thanks, that makes sense. I'm still a bit confused in this context though since it is the only mention of creating the log in the whole file. Does wxWidgets automatically create a wxLog target during initialization? If so is this something that should be done in every app? Are there other objects created that aren't used like this that could be cleaned up to take up less memory? If not, then this makes little sense to me. Thanks again for the answers!