Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 31, 2008, 12:05:12 AM (16 years ago)
Author:
rgrieder
Message:

Properly took care of network::packet::Packet destruction. It depends very much whether the the data was allocated by ENet or by ourselves.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/network/packet/Packet.h

    r1916 r2070  
    8484    unsigned int clientID_;
    8585    ENUM::Direction packetDirection_;
     86    /** Pointer to the data. Be careful when deleting it because it might
     87        point to a location that was allocated by ENet.
     88        See bDataENetAllocated_ */
    8689    uint8_t *data_;
     90    /** Tells whether data_ was allocated by ENet or ourselves.
     91        data_ might no correlate with enetPacket_->data. */
     92    bool bDataENetAllocated_;
    8793  private:
    8894    static std::map<ENetPacket *, Packet *> packetMap_;
Note: See TracChangeset for help on using the changeset viewer.