Code Monkey home page Code Monkey logo

memory_management's Introduction

Rada: Używaj gita. Rób commit co każdy punkt/podpunkt.

1. Uruchom example1 i użyj valgrinda, aby sprawdzić wycieki pamięci
    > mkdir build
    > cd build
    > cmake ..
    > make
    > ./example1
    > valgrind ./example1
   Popraw kod tak, aby nie było wycieku pamięci, skompiluj i ponownie sprawdź program valgrindem

2. Uruchom example2 i sprawdź czy są w nim wycieki pamięci. Popraw program.

3. Uruchom example3 i sprawdź czy są w nim wycieki pamięci
    a) napisz własną klasę wyjątków dziedziczącą po logic_error i użyj jej w kodzie zamiast logic_error
    b) popraw wyciek pamięci w programie

4. Uruchom example4 i sprawdź czy są w nim wycieki pamięci. Popraw program.

5. Uruchom example5 i sprawdź czy są w nim wycieki pamięci.
    a) zmień kod w pliku example5.cpp tak, aby używał unique_ptr
    b) użyj make_unique tam, gdzie to możliwe
    c) sprawdź ponownie program valgrindem

6. Uruchom example6
    a) stwórz ciało funkcji makeFile oraz addToFile
    b) wykorzystaj std::FILE i funkcje fopen, fclose, fprintf

memory_management's People

Contributors

pawelkrysiak avatar wolkonowski avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.