This may be problematic in SWIG.  If Population, etc are just simple structs I would pass them around by value.  If they are classes that must be heap allocated (for inheritance and casting, etc) we use the pImpl pattern,