Linux compilation
> mkdir build
> cd build
> cmake -DCMAKE_BUILD_TYPE=Debug ..
> make
Valgrind usage
> valgrind valgrind_params path/to/binary binary_params, eg:
> valgrind --leak-check=full ./ResourceFactory
> or full output using command: valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --log-file=valgrind-out.txt ./ResourceFactory
Resource exapmle
- Compile and run ResourceFactory application
- Put comments in places where you can spot some problems
- How to remove elements from the collection (
vector<Resource*> resources)?
- Check memory leaks
- Fix problems