Giter Site home page Giter Site logo

Comments (4)

stevemk14ebr avatar stevemk14ebr commented on August 30, 2024

This was chosen to allow the disassembler to be initialized on the stack, and for the parent class that holds m_disasm to not need to use smart pointers (or heap allocation generally), which introduces an extra nullable state

from polyhook_2_0.

denzo9 avatar denzo9 commented on August 30, 2024

Why is using smart pointers an issue for the parent class? The case of accessing a pointer to invalid memory seems more dangerous and pretty likely to occur in this context

from polyhook_2_0.

stevemk14ebr avatar stevemk14ebr commented on August 30, 2024

It's not particularly an issue just an interface choice. I wanted to allow construction on the stack, and most ways you use hooks you'd want the disassembler to be alive as long as the hook instance is so it made sense. Adding in smart pointers or just allocation generally would have been additional complexity and introduce a nullable state I didn't want to handle. So I made it a requirement of the interface the passed dissassembler be alive as long as the class is

from polyhook_2_0.

stevemk14ebr avatar stevemk14ebr commented on August 30, 2024

@denzo9 I'd be happy to change the interface as long as stack allocation of the disassembler stays allowed

from polyhook_2_0.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.