diff options
| author | Tyge Løvset <[email protected]> | 2021-09-19 20:51:59 +0200 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2021-09-19 20:51:59 +0200 |
| commit | f0121ac2e342243e4a78020ce08c35b5297adb4e (patch) | |
| tree | 3b3a362af5d1fcc6d984db503372914cf3f445ad | |
| parent | 0a3fe6211933a8be6ec71ff82a3077da7012e667 (diff) | |
| download | STC-modified-f0121ac2e342243e4a78020ce08c35b5297adb4e.tar.gz STC-modified-f0121ac2e342243e4a78020ce08c35b5297adb4e.zip | |
Corrected example output.
| -rw-r--r-- | docs/csptr_api.md | 3 | ||||
| -rw-r--r-- | examples/sharedptr.c | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/docs/csptr_api.md b/docs/csptr_api.md index 8a6881be..ce70d3c8 100644 --- a/docs/csptr_api.md +++ b/docs/csptr_api.md @@ -1,6 +1,6 @@ # STC [csptr](../include/stc/csptr.h): Shared Pointers -**csptr** is a smart pointer that retains shared ownership of an object through a pointer. +**csptr** is a smart pointer that retains shared ownership of an object through a pointer. Several **csptr** objects may own the same object. The object is destroyed and its memory deallocated when either of the following happens: @@ -124,6 +124,7 @@ vec: 2021 2012 2022 2015 del: 2022 vec: 2021 2012 set: 2015 2021 +2021 is now owned by 3 objects Done del: 2015 del: 2021 diff --git a/examples/sharedptr.c b/examples/sharedptr.c index daaf646f..a45e19bc 100644 --- a/examples/sharedptr.c +++ b/examples/sharedptr.c @@ -47,7 +47,7 @@ int main() printf("\n%d is now owned by %zu objects\n", *p.get, *p.use_count);
}
- puts("\nDone");
+ puts("Done");
}
}
|
