Skip to content
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

Update smart_pointers_best_practices.md #27

Merged
merged 1 commit into from
Sep 22, 2020

Conversation

niemarcin
Copy link
Contributor

@niemarcin niemarcin commented Sep 21, 2020

operations C changed to A & B

operations C changed to A i B
Copy link
Contributor

@WBigaj WBigaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch :)

@ziobron ziobron merged commit 9addd58 into coders-school:master Sep 22, 2020
arafalski referenced this pull request in arafalski/memory-management Sep 23, 2020
arafalski referenced this pull request in arafalski/memory-management Oct 5, 2020
* Update smart_pointers_best_practices.md (#27)

operations C changed to A i B

* weak_ptr lock() updated

Co-authored-by: Marcin N <19634288+niemarcin@users.noreply.github.com>
arafalski referenced this pull request in arafalski/memory-management Oct 8, 2020
Base files

Added CI

Revert "Added CI"

This reverts commit 89e826e.

Added CI

Added SharedControlBlock

Rule of 5

Update main.cpp

Added operator*()

Added dereference test case

Added copying test case

Added moving test case

Added operator->

Added get method

Added use_count method

Added operator bool

Added custom deleter support to SharedControlBlock

Implementation of make_shared

Make_shared test case

Added make_shared to cmake

Update main

Changed function pointer to std::function

Refactoring make_share test

Changed function pointer to std::function - shared_ptr

Shared_ptr - reset() method (#9)

* Reset method

* Deleted redundant reset() overload

weak_ptr with tests added (#10)

* Initial weak_ptr class added

* Initial version of weak_ptr

* Update of destructor for weak_ptr

* SEGV fixed in weak_ptr

* weak_ptr constructors which using shared_ptr works

* Tests added, code refactored

* Code correction

Proper delete conditions (#13)

* Pragma once

* Fixed weakRefs counter

* Fixed delete conditions in weak and shared ptr

* Uncommented main fun

* Breaking cycle dependencies

* Moved cycle dependencies checking to main fun

* Moved shared_ptr deleting sequence to the lambda expression

* Changed lambda to private method

* Moved delete sequence to private method - weak_ptr

* Added shared_ptr constructor that takes weak_ptr

weak_ptr lock() updated (#15)

* Update smart_pointers_best_practices.md (#27)

operations C changed to A i B

* weak_ptr lock() updated

Co-authored-by: Marcin N <19634288+niemarcin@users.noreply.github.com>

Deleted redundant constexpr

Explicit

Homework2 (#17)

* add struct of objects template

* make_shared as shared_ptr friend

* Implement make_shared function

Leak in weak_ptr

Homework2 make shared - changed idea (#18)

* Changed name of std::function in controlblock

* Make_shared - changed idea

* Refactoring

* Deleted controlblock-ut

* Refactoring

* Test

* Revert "Refactoring"

This reverts commit 97ef637.

* Revert "Revert "Refactoring""

This reverts commit e842773.

* Revert "Test"

This reverts commit 6a2e411.

* Test

* test

* test123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants