asher dunn . com

« back to Home

Projects & Downloads

In my free-time wanderings, I sometimes make things that I think others might enjoy or find useful. Recently (2009-2010) I've been writing a lot of C++, so I've posted a few useful C++ templates and classes. Original work source code here is generally licensed under the MIT License, and other stuff generally under the Creative Commons Attribution 3.0 License. Each code download will include its own license file, though.

Reference-Counting Template for C++

sourcecode-h

I made a simple class template that performs automatic reference counting and memory management in C++. If you want to reference count objects of YourClass, simply pass around and store adu::ref<YourClass> instead of YourClass*, and the objects will be automatically deleted when the last reference to them disappears.

No other code changes are necessary, since member access and dereferencing of an adu::ref<YourClass> work exactly the same way as with pointers. YourClass or one of its superclasses must implement a simple (two-method) interface; a small base class is provided that satisfies this interface, but it is not necessary to use it, merely convenient.

Desktop Backgrounds

These are a few desktop backgrounds/wallpapers which I made, like, and am proud of. You can download each in a variety of sizes, although the originals weren't that high resolution to begin with (apologies to those of you with 30" screens).

cosmos-small inknightsky-small