Use FreeAndNil across the board. Even if we are immediately assigning after, probably avoids accidental mistakes. Also free neglected owner tex on shutdown, and delete hog gears using the normal deletion procedure if for any reason they still exist (EndGame call?).
Hedgewars - a turn based strategy game.
=======================================
Copyright 2004-2014 Andrey Korotaev <unC0Rr@gmail.com> and others.
See QTfrontend/res/html/about.html and CREDITS for a complete list of authors.
Licence:
--------
Source code is distributed under the terms of the GNU General Public Licence
version 2; images and sounds are distributed under the terms of the GNU Free
Documentation Licence version 1.2. See the COPYING file for the full text of
the licenses.
Instructions:
-------------
See our wiki at: https://code.google.com/p/hedgewars/wiki/BuildingHedgewars
You can find an outline of the necessary dependencies in the INSTALL file.
Source code:
------------
Our main repository is located at http://hedgewars.googlecode.com using
Mercurial as DVCS. A Git repository is also available (mirrored daily)
at https://github.com/hedgewars/hw
Contribute:
-----------
If you see a bug or have any suggestion please use the official bug tracker at
http://code.google.com/p/hedgewars/issues/list or the integrated feedback
button.
If you want to help or get to know the sources better you can do that with some
easy tasks from http://code.google.com/p/hedgewars/wiki/TODO. We also have an
extended API in LUA to customize your adventures in our wiki at
http://code.google.com/p/hedgewars/wiki/LuaAPI.
If you know your way through the code feel free to send a patch or open a pull
request. The best LUA scripts get released in the official DLC page and later
integrated in the next version.
Contact:
--------
* IRC channel - irc://irc.freenode.net/hedgewars
* community forum - http://www.hedgewars.org/forum
* mailing list - https://mail.gna.org/listinfo/hedgewars-dev