[UI] Corrected memleaks
This commit is contained in:
@@ -19,7 +19,6 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <Wt/WStringListModel>
|
||||
#include <Wt/WFormModel>
|
||||
#include <Wt/WLineEdit>
|
||||
#include <Wt/WCheckBox>
|
||||
|
||||
@@ -99,7 +99,7 @@ class AudioFormModel : public Wt::WFormModel
|
||||
|
||||
Database::User::pointer user = Database::User::getById(_db.getSession(), _userId);
|
||||
|
||||
_bitrateModel = new Wt::WStringListModel();
|
||||
_bitrateModel = new Wt::WStringListModel(this);
|
||||
BOOST_FOREACH(std::size_t bitrate, Database::User::audioBitrates)
|
||||
{
|
||||
if (user && bitrate <= user->getMaxAudioBitrate())
|
||||
|
||||
@@ -269,12 +269,12 @@ class UserFormModel : public Wt::WFormModel
|
||||
void initializeModels()
|
||||
{
|
||||
// AUDIO
|
||||
_audioBitrateModel = new Wt::WStringListModel();
|
||||
_audioBitrateModel = new Wt::WStringListModel(this);
|
||||
BOOST_FOREACH(std::size_t bitrate, Database::User::audioBitrates)
|
||||
_audioBitrateModel->addString( Wt::WString("{1}").arg( bitrate / 1000 ) ); // in kbps
|
||||
|
||||
// VIDEO
|
||||
_videoBitrateModel = new Wt::WStringListModel();
|
||||
_videoBitrateModel = new Wt::WStringListModel(this);
|
||||
BOOST_FOREACH(std::size_t bitrate, Database::User::videoBitrates)
|
||||
_videoBitrateModel->addString( Wt::WString("{1}").arg( bitrate / 1000 ) ); // in kbps
|
||||
|
||||
|
||||
Reference in New Issue
Block a user