I’ve asked this question On Stackoverflow and users there are voting to close it. It was suggested in the comments that I ask here instead.
Everyone is quick to point out the “Rule of Zero” in code reviews, peer conversations, and Stack Overflow comments/answers.
I am not a believer. I’d like to be. Usually if enough people agree on something enough for it to get its own label and become an idiom, then it is well thought out….
So, let me explain my reason for not believing:
I cannot count the number of times I have been tasked to debug a crash dump from a production crash. While debugging said dump, I can look up and down the call stack and sometimes I have the need to see “When is this class being constructed?” Secondarily, I might need to see “What is its or its members addresses when it is?” This usually leads to some other place in the code after evidence that more instances are being created than should be, or when addresses or sizes are not what is expected.
This could also apply, when I want to see “When is this class being assigned to?”
As such, I’ve always implement all 5 methods, trivial or not, in order to provide a place to break in future debug sessions while reproducing the conditions in the dump without having to change the source. Without them, there would be no way (easily) to perform the above debugging session.
If you modify source in order to provide a line of code to break on, your crash dump is no longer usable with the source.
Now, some would say that this situation does not arise often enough for them to add more code, and more potential bugs, in the case of trivial constructors and assignment operators. However, I’d argue that one occasion having to explain to your superiors that you have to make another build, redeploy to production, reproduce the crash, and retrieve another dump, in order to even start debugging the problem, is enough to change one’s outlook. That is not an enjoyable experience and it has occurred to me a number of times.
So, please make me a believer!
Tell me how I can accomplish the above described debugging session given a crash dump, when there is no line available to break on, after being a good boy and following the “Rule of Zero”.
1) Break any time any instance of a given class is being constructed without any lines of constructor code to break on.
2) Break any time any instance of a given class is being assigned to without any lines of assignment operator to break on.
I am using Visual Studio, and more specifically Visual Studio 2015.
✓ Extra quality
ExtraProxies brings the best proxy quality for you with our private and reliable proxies
✓ Extra anonymity
Top level of anonymity and 100% safe proxies – this is what you get with every proxy package
✓ Extra speed
1,ooo mb/s proxy servers speed – we are way better than others – just enjoy our proxies!
USA proxy location
We offer premium quality USA private proxies – the most essential proxies you can ever want from USA
Our proxies have TOP level of anonymity + Elite quality, so you are always safe and secure with your proxies
Use your proxies as much as you want – we have no limits for data transfer and bandwidth, unlimited usage!
Superb fast proxy servers with 1,000 mb/s speed – sit back and enjoy your lightning fast private proxies!
99,9% servers uptime
Alive and working proxies all the time – we are taking care of our servers so you can use them without any problems
No usage restrictions
You have freedom to use your proxies with every software, browser or website you want without restrictions
Perfect for SEO
We are 100% friendly with all SEO tasks as well as internet marketing – feel the power with our proxies
Buy more proxies and get better price – we offer various proxy packages with great deals and discounts
We are working 24/7 to bring the best proxy experience for you – we are glad to help and assist you!