mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:36:38 +02:00
Let's actually close our sessios on exit.
This commit is contained in:
parent
1e4bfffdd8
commit
9a892ea51a
3 changed files with 8 additions and 1 deletions
|
@ -29,7 +29,7 @@ void MetavoxelServer::applyEdit(const MetavoxelEditMessage& edit) {
|
|||
}
|
||||
|
||||
void MetavoxelServer::removeSession(const QUuid& sessionId) {
|
||||
delete _sessions.take(sessionId);
|
||||
_sessions.take(sessionId)->deleteLater();
|
||||
}
|
||||
|
||||
const char METAVOXEL_SERVER_LOGGING_NAME[] = "metavoxel-server";
|
||||
|
|
|
@ -24,6 +24,12 @@ MetavoxelSystem::MetavoxelSystem() :
|
|||
_buffer(QOpenGLBuffer::VertexBuffer) {
|
||||
}
|
||||
|
||||
MetavoxelSystem::~MetavoxelSystem() {
|
||||
for (QHash<QUuid, MetavoxelClient*>::const_iterator it = _clients.begin(); it != _clients.end(); it++) {
|
||||
delete it.value();
|
||||
}
|
||||
}
|
||||
|
||||
void MetavoxelSystem::init() {
|
||||
if (!_program.isLinked()) {
|
||||
switchToResourcesParentIfRequired();
|
||||
|
|
|
@ -32,6 +32,7 @@ class MetavoxelSystem : public QObject {
|
|||
public:
|
||||
|
||||
MetavoxelSystem();
|
||||
~MetavoxelSystem();
|
||||
|
||||
void init();
|
||||
|
||||
|
|
Loading…
Reference in a new issue