mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 20:16:16 +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) {
|
void MetavoxelServer::removeSession(const QUuid& sessionId) {
|
||||||
delete _sessions.take(sessionId);
|
_sessions.take(sessionId)->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char METAVOXEL_SERVER_LOGGING_NAME[] = "metavoxel-server";
|
const char METAVOXEL_SERVER_LOGGING_NAME[] = "metavoxel-server";
|
||||||
|
|
|
@ -24,6 +24,12 @@ MetavoxelSystem::MetavoxelSystem() :
|
||||||
_buffer(QOpenGLBuffer::VertexBuffer) {
|
_buffer(QOpenGLBuffer::VertexBuffer) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MetavoxelSystem::~MetavoxelSystem() {
|
||||||
|
for (QHash<QUuid, MetavoxelClient*>::const_iterator it = _clients.begin(); it != _clients.end(); it++) {
|
||||||
|
delete it.value();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MetavoxelSystem::init() {
|
void MetavoxelSystem::init() {
|
||||||
if (!_program.isLinked()) {
|
if (!_program.isLinked()) {
|
||||||
switchToResourcesParentIfRequired();
|
switchToResourcesParentIfRequired();
|
||||||
|
|
|
@ -32,6 +32,7 @@ class MetavoxelSystem : public QObject {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
MetavoxelSystem();
|
MetavoxelSystem();
|
||||||
|
~MetavoxelSystem();
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue