Search:

Type: Posts; User: hpesoj

Search: Search took 0.00 seconds.

  1. Replies
    15
    Views
    4,773

    I see your reasoning. I guess the consensus here...

    I see your reasoning. I guess the consensus here is that you should make use of smart pointers wherever possible. I shouldn't be accessing the objects too frequently externally, just for setting...
  2. Replies
    15
    Views
    4,773

    You are correct, the idea of weak_ptrs is so that...

    You are correct, the idea of weak_ptrs is so that you can hold a reference to the object without having ownership. To access the object using weak_ptr, you have to lock it (by calling the lock()...
  3. Replies
    15
    Views
    4,773

    Well, like you said, if the user holds shared_ptr...

    Well, like you said, if the user holds shared_ptr references the Entity will not be deleted, and the user will still be able to use it, therefore some extra checks/coordination between the objects...
  4. Replies
    15
    Views
    4,773

    No one inparticular. I've seen many people write...

    No one inparticular. I've seen many people write something along the lines of this. I've always assumed they are just stuck in their old ways, or just have never really looked at the benefits.

    ...
  5. Replies
    15
    Views
    4,773

    When to use shared_ptr?

    Hi, I have seen several responses to this question before, ranging from "Never! Smart pointers are evil!" to "Only when you have resources that the main framework does not directly track." to...
  6. Replies
    6
    Views
    4,723

    But surely if I'm compiling exactly the same code...

    But surely if I'm compiling exactly the same code as them, 'size_t' should be defined the same for both of us? I included iostream in the example because it seemed that was where size_t was defined...
  7. Replies
    6
    Views
    4,723

    Overloaded size_t operator

    I am trying to compile a specific library, that apparently compiles fine for the author, but not for me. The following code demonstrates the problem (at least for me):


    #include <iostream>
    ...
Results 1 to 7 of 7