<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Resource-Management on Loki Astari</title><link>https://lokiastari.com/categories/Resource-Management/</link><description>Recent content in Resource-Management on Loki Astari</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Fri, 25 Mar 2016 05:53:07 -0700</lastBuildDate><atom:link href="https://lokiastari.com/categories/Resource-Management/index.xml" rel="self" type="application/rss+xml"/><item><title>Memory Resizing</title><link>https://lokiastari.com/posts/MemoryResizing/</link><pubDate>Fri, 25 Mar 2016 05:53:07 -0700</pubDate><guid>https://lokiastari.com/posts/MemoryResizing/</guid><description>So why is the constant resize factor of the array 1.5 or 2?</description></item><item><title>Vector - Simple Optimizations</title><link>https://lokiastari.com/posts/Vector-SimpleOptimizations/</link><pubDate>Sat, 19 Mar 2016 15:06:40 -0700</pubDate><guid>https://lokiastari.com/posts/Vector-SimpleOptimizations/</guid><description>C++ By Example. The Vector Part 4. We look at a couple of other types available in the template utility library that allow optimization via SFINAE.</description></item><item><title>Vector - Resize</title><link>https://lokiastari.com/posts/Vector-Resize/</link><pubDate>Sat, 12 Mar 2016 05:53:07 -0700</pubDate><guid>https://lokiastari.com/posts/Vector-Resize/</guid><description>C++ By Example. The Vector Part 3. Because resizing a vector is expensive, the standard vector class uses exponential growth to minimize the number of times that the vector is resized, a technique we replicate in this version. But every now and then, you still need to resize the internal buffer.</description></item><item><title>Vector - Resource Management Copy Swap</title><link>https://lokiastari.com/posts/Vector-ResourceManagementCopySwap/</link><pubDate>Mon, 29 Feb 2016 12:29:20 -0800</pubDate><guid>https://lokiastari.com/posts/Vector-ResourceManagementCopySwap/</guid><description>C++ By Example. The Vector Part 2. In the previous article, I went over basic allocation for a `Vector` like class. In this article, I want to put some detail around the copy assignment operator and resizing the underlying `Vector`. Unlike the other methods previously discussed, these methods have to deal with both construction and destruction of elements and the potential of exceptions interrupting the processes. The goal is to provide exception safe methods that provide the strong exception guarantee for the object and do not leak resources.</description></item><item><title>Vector - Resource Management Allocation</title><link>https://lokiastari.com/posts/Vector-ResourceManagementAllocation/</link><pubDate>Sat, 27 Feb 2016 12:00:31 -0800</pubDate><guid>https://lokiastari.com/posts/Vector-ResourceManagementAllocation/</guid><description>C++ By Example. The Vector - Part 1. Many new developers of C++ attempt to build a `Vector&amp;#39;- like container as a learning process. Getting a simple version of this working for POD types (like int) is not that complicated. The next step in getting this working for arbitrary data types takes a significant leap forward in thinking in C++, especially when you start looking at efficiency and exception safety. This set of five articles looks at building an efficient `Vector` implementation. I show some common mistakes and explain why and how to resolve the problems.</description></item></channel></rss>