mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 07:48:37 -04:00
Merge branch 'release/1.10.x'
This commit is contained in:
commit
36c3d3e622
@ -1124,7 +1124,9 @@ operator new(size_t size) {
|
|||||||
*/
|
*/
|
||||||
INLINE void DCPacker::StackElement::
|
INLINE void DCPacker::StackElement::
|
||||||
operator delete(void *ptr) {
|
operator delete(void *ptr) {
|
||||||
StackElement *obj = (StackElement *)ptr;
|
if (ptr != nullptr) {
|
||||||
obj->_next = _deleted_chain;
|
StackElement *obj = (StackElement *)ptr;
|
||||||
_deleted_chain = obj;
|
obj->_next = _deleted_chain;
|
||||||
|
_deleted_chain = obj;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -628,7 +628,7 @@ class ServerRepository:
|
|||||||
del self.clientsByConnection[client.connection]
|
del self.clientsByConnection[client.connection]
|
||||||
del self.clientsByDoIdBase[client.doIdBase]
|
del self.clientsByDoIdBase[client.doIdBase]
|
||||||
|
|
||||||
id = client.doIdBase / self.doIdRange
|
id = client.doIdBase // self.doIdRange
|
||||||
self.idAllocator.free(id)
|
self.idAllocator.free(id)
|
||||||
|
|
||||||
self.qcr.removeConnection(client.connection)
|
self.qcr.removeConnection(client.connection)
|
||||||
@ -689,7 +689,7 @@ class ServerRepository:
|
|||||||
def clientHardDisconnectTask(self, task):
|
def clientHardDisconnectTask(self, task):
|
||||||
""" client did not tell us he was leaving but we lost connection to
|
""" client did not tell us he was leaving but we lost connection to
|
||||||
him, so we need to update our data and tell others """
|
him, so we need to update our data and tell others """
|
||||||
for client in self.clientsByConnection.values():
|
for client in list(self.clientsByConnection.values()):
|
||||||
if not self.qcr.isConnectionOk(client.connection):
|
if not self.qcr.isConnectionOk(client.connection):
|
||||||
self.handleClientDisconnect(client)
|
self.handleClientDisconnect(client)
|
||||||
return Task.cont
|
return Task.cont
|
||||||
|
@ -85,7 +85,9 @@ public:
|
|||||||
return ptr; \
|
return ptr; \
|
||||||
} \
|
} \
|
||||||
inline void operator delete(void *ptr) { \
|
inline void operator delete(void *ptr) { \
|
||||||
StaticDeletedChain< Type >::deallocate((Type *)ptr, get_type_handle(Type)); \
|
if (ptr != nullptr) { \
|
||||||
|
StaticDeletedChain< Type >::deallocate((Type *)ptr, get_type_handle(Type)); \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
inline void operator delete(void *, void *) { \
|
inline void operator delete(void *, void *) { \
|
||||||
} \
|
} \
|
||||||
@ -104,7 +106,9 @@ public:
|
|||||||
return ptr; \
|
return ptr; \
|
||||||
} \
|
} \
|
||||||
inline void operator delete(void *ptr) { \
|
inline void operator delete(void *ptr) { \
|
||||||
_deleted_chain.deallocate((Type *)ptr, get_type_handle(Type)); \
|
if (ptr != nullptr) { \
|
||||||
|
_deleted_chain.deallocate((Type *)ptr, get_type_handle(Type)); \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
inline void operator delete(void *, void *) { \
|
inline void operator delete(void *, void *) { \
|
||||||
} \
|
} \
|
||||||
|
@ -32,7 +32,9 @@
|
|||||||
return ptr; \
|
return ptr; \
|
||||||
} \
|
} \
|
||||||
inline void operator delete(void *ptr) { \
|
inline void operator delete(void *ptr) { \
|
||||||
PANDA_FREE_SINGLE(ptr); \
|
if (ptr != nullptr) { \
|
||||||
|
PANDA_FREE_SINGLE(ptr); \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
inline void operator delete(void *, void *) { \
|
inline void operator delete(void *, void *) { \
|
||||||
} \
|
} \
|
||||||
@ -44,7 +46,9 @@
|
|||||||
return ptr; \
|
return ptr; \
|
||||||
} \
|
} \
|
||||||
inline void operator delete[](void *ptr) { \
|
inline void operator delete[](void *ptr) { \
|
||||||
PANDA_FREE_ARRAY(ptr); \
|
if (ptr != nullptr) { \
|
||||||
|
PANDA_FREE_ARRAY(ptr); \
|
||||||
|
} \
|
||||||
} \
|
} \
|
||||||
inline void operator delete[](void *, void *) { \
|
inline void operator delete[](void *, void *) { \
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user