-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QueryNode: Memory leak fix + refactoring #614
Conversation
uklotzde
commented
Jun 9, 2015
- Cherry pick memory leak fix from 1.12 to avoid merge conflicts
- Replace plain pointers with std::unique_ptr to avoid memory leaks
- Delete obsolete constructors and destructors
- Add 'override' keyword to inherited virtual functions in derived classes
- Fix (or comment) fragile design of Numeric-/DurationFilterNode
- Consistent wrapping of SQL expressions into parantheses
- Improve readability using auto and std::make_unique
Virtual member functions should not be called from within the constructor!
Just a note -- in general I'd like to avoid switching to STL containers (just yet). The main reason being is that we don't control the implementation of that container while we do control what version of Qt we bundle with Mixxx so we know exactly what we're getting. This argument is primarily oriented around engine code. However we have had memory and performance issues outside of the engine (e.g. in the waveform) due to our use of STL vectors and not being able to easily inspect its implementation on every given platform. Also if we are using a mix of containers then it becomes harder for modules to interoperate. |
QueryNode: Memory leak fix + refactoring
} | ||
|
||
protected: | ||
QList<QueryNode*> m_nodes; | ||
// NOTE(uklotzde): std::vector is more suitable (efficiency) | ||
// than a QList for a private member. And QList from Qt 4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assumed we switched also to Qt5 now. AFAIK we chose that 1.12 will be the last Qt4 release
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am afraid we will fail the one or two month after 1.12 release target for the mp3 fixes.
So I think we should have an other qt4 release.
I think we should either cut a branch for 1.13 or for Qt5