coders-school / memory-management Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Breaking cycle - solution
Use std::weak_ptr in one direction
`
#include
struct Node {
std::shared_ptr child;
std::weak_ptr parent;
};
int main () {
auto root = std::shared_ptr(new Node);
auto child = std::shared_ptr(new Node);
root->child = child;
child->parent = root;
}`
Problem with naming convention. Same names as node members in Node class, and as main shared_ptr objects.
Wskaźniki inteligentne
0x0C ResourceFactory
https://user-images.githubusercontent.com/77102726/134931566-f4ec50eb-5c0c-4181-a307-7ad1b77f1d65.png
Outro test. Question from memory#2.
I think answers "in line 13 uptr is already nullptr" and "in line 12 uptr is already nullptr" are ambiguous, because in line 13 uptr is still nullptr. The applicant doesn's know if You mean it's first time nullptr or it's still nullptr.
In Semantyka przenoszenia: 0x0A std::move video 2:33min you add word no. 1, this is a second time in this module, I don't know in which video appear firs time, but I have already this word in my notes.
In homework's readme:
https://github.com/coders-school/memory-management/tree/shared_ptr/homework/shared_ptr
I found outdated links:
"Pre-work
Read the presentation about move semantics and std::forward
Read the variadic template part of this presentation
It will be useful for a post-work ;)"
In Semantyka przenoszenia: 0x0E Copy elision video 5:02min you add word no. 24, this is a second time in this module, I don't know in which video appear firs time, but I have already this word in my notes.
In Semantyka przenoszenia: 0x03 l-value, r-value video 2:22min you add word no. 16, this is a second time in this module, I don't know in which video appear firs time, but I have already this word in my notes.
In 0x03 unique_ptr video 4:12min you add word no. 9, this is a second time in this module, I don't know in which video appear firs time, but I have already this word in my notes
Since October 2022 there is a new version of the file-existence-action. In .github/workflows/main.yml
the line
uses: andstor/file-existence-action@v1
should be changed to uses: andstor/file-existence-action@v2
Check official repository for reference:
https://github.com/andstor/file-existence-action
Fixed in PR: #104 (comment)
Commit: 9984136
On brunch resource
in memory-management/.github/scripts/check.sh
one testcase assumes that user didn't modify the file before pushing to the server:
pattern ${FILE} "Looking for the allocation place" "main \(resourceD.cpp:30\)"
In file module2/smart_pointers_best_practices.md
"order of evaluation" A1, A2, B1, B2, C3, C3
there is no C-element
#27 PR
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.