Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove raw pointer usage [TRACKER] #38

Open
15 of 16 tasks
henriquegemignani opened this issue Sep 12, 2014 · 5 comments
Open
15 of 16 tasks

Remove raw pointer usage [TRACKER] #38

henriquegemignani opened this issue Sep 12, 2014 · 5 comments

Comments

@henriquegemignani
Copy link
Member

henriquegemignani commented Sep 12, 2014

Use smart pointers to automate memory management and document clearly when a function steals ownership.

  • Scenes @ system::PushScene
  • CollisionObjects @ CollisionManager

Certainly more...

EDIT (by @Kazuo256):

Track of raw pointers-related issues:

Raw pointers that will not be removed:

  • T* in structure::IndexableTable
  • T* in resource::ResourceContainer
@RudaF
Copy link
Contributor

RudaF commented May 24, 2017

Another files that use raw pointers for further change

modules\ugdk-2d\include\ugdk\desktop\2D\window.h
modules\ugdk-2d\include\ugdk\desktop\graphic\canvas.h
modules\ugdk-2d\include\ugdk\desktop\graphic\defaultshaders.h
modules\ugdk-2d\include\ugdk\desktop\graphic\exceptions.h
modules\ugdk-2d\include\ugdk\desktop\graphic\immediate.h
modules\ugdk-2d\include\ugdk\desktop\graphic\manager.h
modules\ugdk-2d\include\ugdk\desktop\graphic\module.h
modules\ugdk-2d\include\ugdk\desktop\graphic\primitive.h
modules\ugdk-2d\include\ugdk\desktop\graphic\primitivecontroller.h
modules\ugdk-2d\include\ugdk\desktop\graphic\primitivesetup.h
modules\ugdk-2d\include\ugdk\desktop\graphic\rendertexture.h
modules\ugdk-2d\include\ugdk\desktop\graphic\sprite.h
modules\ugdk-2d\include\ugdk\desktop\graphic\textureatlas.h
modules\ugdk-2d\include\ugdk\desktop\graphic\testureunit.h
modules\ugdk-2d\include\ugdk\desktop\graphic\vertexdata.h
modules\ugdk-2d\include\ugdk\desktop\text\font.h
modules\ugdk-2d\include\ugdk\desktop\text\functions.h
modules\ugdk-2d\include\ugdk\desktop\text\label.h
modules\ugdk-2d\include\ugdk\desktop\text\manager.h
modules\ugdk-2d\include\ugdk\desktop\text\module.h
modules\ugdk-2d\include\ugdk\desktop\text\textbox.h
modules\ugdk-2d\include\ugdk\desktop\ui\drawable\texturedrectangle.h
modules\ugdk-2d\include\ugdk\desktop\ui\button.h
modules\ugdk-2d\include\ugdk\desktop\ui\drawable.h
modules\ugdk-2d\include\ugdk\desktop\ui\menu.h
modules\ugdk-2d\include\ugdk\desktop\ui\node.h

@josealvim
Copy link
Collaborator

raw-pointer(core).txt

@Kazuo256
Copy link
Member

We'll probably have to split this issue into many.

@josealvim
Copy link
Collaborator

josealvim commented May 31, 2017

In modules
In ugdk-core
presume all in namespace ugdk

  • pyramidworks::collision::CollisionObject at:

    • pyramidworks::collision::CollisionManager::AddActiveObject
    • pyramidworks::collision::CollisionManager::RemoveActiveObject
    • pyramidworks::collision::CollisionManager::active_objects
  • Scene at:

    • system::PushScene
    • action::SceneFocusEvent::SceneFocusEvent
    • action::SceneDeFocusEvent::SceneDeFocusEvent
    • action::SceneFinishedEvent::SceneFinishedEvent
  • char* at

    • debug::ConvertLogToString
    • filesystem::Manager::OpenFile
    • input::TextInputEvent::TextInputEvent
    • filesystem::File::fgets
    • input::TextInput::current_composition
    • system::BaseException::BaseException
    • system::BaseException::what
    • system::BaseException::InvalidOperation::InvalidOperation
    • util/utf8.h @ utf8_to_ucs4
    • util/utf8.h @ ucs4_to_utf8
  • void* at

    • filesystem::File::ReadRaw
    • filesystem::File::WriteRaw
  • class T* at

    • filesystem::File::Read
    • filesystem::File::Write
  • resource::ResourceContainer at

    • resource::ResourceContainer::Get
    • resource::Manager::GetContainer
  • structure::Box at

    • structure::Box::Intersects
  • structure::ikdtree::Item at

    • structure::ikdtree::IntervalKDTree::begin
    • structure::ikdtree::IntervalKDTree::end
    • structure::ikdtree::Node::InsertItem
    • structure::ikdtree::Node::RemoveItem
    • structure::ikdtree::UpdateItem
  • structure::ikdtree::Node at

    • structure::ikdtree::Item::set_container_node
    • structure::ikdtree::Item::container_node
    • structure::ikdtree::Node::Node
  • structure::ikdtree::IntervalKDTree at

    • structure::ikdtree::Node::Node
  • system::SDLEventHandler at

    • system::RegisterSDLHandler
    • system::DeregisterSDLHandler

@rubens-bolgheroni
Copy link
Contributor

rubens-bolgheroni commented May 31, 2017

  • RenderTarget at:
    • graphic::Canvas::Canvas
  • ShaderProgram at:
    • graphic::ShaderProgram
  • char at:
    • desktop::mode2d::Window
    • graphic::NotSupportedException
    • graphic::VertexData::Checksizes
  • GLTexture at:
    • graphic::immediate::Rectangle
    • graphic::Primitive::Primitive
    • graphic::PrimitiveSetup::Rectangle::Prepare
    • graphic::RenderTexture::RenderTarget
    • graphic::TextureAtlas::TextureAtlas
    • graphic::TextureUnit::BindTexture
    • ui::TexturedRectangle
  • TextureAtlas at:
    • graphic::immediate::Rectangle
    • graphic::PrimitiveSetup::Sprite::Prepare
    • graphic::PrimitiveControllerSprite::PrimitiveControllerSprite
    • graphic::TextureAtlas::BoundPiece
  • void at:
    +??????manager.h
  • ShaderProgram at:
    • graphic::Primitive::Primitive
  • Primitive at:
    • graphic::PrimitiveController::set_owner
  • T at:
    • graphic::VertexData::Mapper
  • texture_font_t at:
    • text::Font
  • Font at:
    • text::FillBufferWithText
    • text::DrawTextLine
    • text::Label::Label
    • text::Manager
  • TextBox at:
    • text::Manager
    • text::TextBox::TextBox
  • Button at:
    • ui
  • Drawable at:
    • ui::Drawable::set_draw_setup_function
    • ui::Node
  • menu pointer at:
    • ui::MenuCallback
  • UIElement pointer at:
    • ui::Menu
  • Node at:
    • ui::Menu
    • ui::Node

@Kazuo256 Kazuo256 changed the title Remove raw pointer usage Remove raw pointer usage [TRACKER] Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants