-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potencial leak / seg fault (#726)
* Fix potencial leak / seg fault Signed-off-by: ahcorde <[email protected]> * Avoid make copies Signed-off-by: ahcorde <[email protected]> * make linters happy Signed-off-by: ahcorde <[email protected]> * Added feedback Signed-off-by: ahcorde <[email protected]> * Heavily revamp ros_image_texture.cpp The main goal here is to stop using a pointer from a freed std::vector. Instead, we allocate memory on the heap and delete it when this piece of code no longer needs it (Ogre copies it internally). Along the way, we do a huge cleanup of this code to make it easier to understand and fix some obvious problems with it: 1. Improve the locking. 2. Make some methods const. 3. Move implementations in the C++ file. 4. Remove unnecessary functions. 5. Rename a few things to make their function clearer. Signed-off-by: Chris Lalancette <[email protected]> * Fix an incorrect cast. Signed-off-by: Chris Lalancette <[email protected]> --------- Signed-off-by: ahcorde <[email protected]> Signed-off-by: Chris Lalancette <[email protected]> Co-authored-by: Chris Lalancette <[email protected]>
- Loading branch information
1 parent
d5b274f
commit 9050571
Showing
4 changed files
with
217 additions
and
203 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.