c++ parasoft error

99封情书 提交于 2019-12-11 19:47:37

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!