gboncoffee.dev.br

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | LICENSE

commit 4dcea7ded9abc11ea6ddb20a3142687663a32b0a
parent 035934f88e198e82d907617f68cf2aa8dc7f85ad
Author: Gabriel G. de Brito <gabrielgbrito@icloud.com>
Date:   Mon, 28 Oct 2024 16:45:05 -0300

lmao

Diffstat:
Mcontent/posts/notes-on-cpp.md | 2++
Mpublic/posts/notes-on-cpp/index.html | 2++
2 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/content/posts/notes-on-cpp.md b/content/posts/notes-on-cpp.md @@ -33,3 +33,5 @@ I'll update this rather frequently. ImAClownForCodingInThisShittyLanguage()`. - When you have a `std::vector<T>`, passing a `T*` to it's `push_back()` method may compile without errors and fuck you a lot. +- If you have a `std::vector<T*>`, calling it's `clear()` won't delete the + memory of the objects the vector holds, tho it'll call it's destructors. diff --git a/public/posts/notes-on-cpp/index.html b/public/posts/notes-on-cpp/index.html @@ -84,6 +84,8 @@ God help you) need typeinfo for a non-polymorphic class, you must use a placeholder USELESS virtual function like <code>virtual void ImAClownForCodingInThisShittyLanguage()</code>.</li> <li>When you have a <code>std::vector&lt;T&gt;</code>, passing a <code>T*</code> to it&rsquo;s <code>push_back()</code> method may compile without errors and fuck you a lot.</li> +<li>If you have a <code>std::vector&lt;T*&gt;</code>, calling it&rsquo;s <code>clear()</code> won&rsquo;t delete the +memory of the objects the vector holds, tho it&rsquo;ll call it&rsquo;s destructors.</li> </ul> </div>