问题
I have parasoft my solution and I am getting 3 errors which are the same, "Objects to manage resources should be used instead" These errors are coming from a struct I've created. How can I remove this without altering my struct? "pointer name" pointer
回答1:
It's probably saying you should use some sort of smart pointers to manage dynamically created objects instead of new and delete.
回答2:
You can go to the quality task view to look at the violation that is being generated. From there you can right click on the violation and select "View Rule Documentation" this will give you an idea of what the violation is flagging and also give you some sample code on how to fix the violation.
If you want to just ignore the violation you can either disable the rule in your test configuration or suppress the violation. This can be done by right clicking on the violation and selecting "Suppress Task"
来源:https://stackoverflow.com/questions/10388357/c-parasoft-error