Index: trunk/src/formats/assimp_loader.cc
===================================================================
--- trunk/src/formats/assimp_loader.cc	(revision 382)
+++ trunk/src/formats/assimp_loader.cc	(revision 383)
@@ -188,5 +188,5 @@
 }
 
-bool nv::assimp_loader::load_bones( size_t index, std::vector< mesh_node_data >& bones )
+bool nv::assimp_loader::load_bones( size_t index, array_ref< mesh_node_data > bones )
 {
 	if ( m_scene == nullptr ) return false;
@@ -285,10 +285,10 @@
 {
 	const aiScene* scene = (const aiScene*)m_scene;
-	std::vector< mesh_node_data > final_bones;
+	vector< mesh_node_data > final_bones;
 	std::unordered_map< std::string, uint16 > names;
 	for ( unsigned int m = 0; m < m_mesh_count; ++m )
 	{
 		uint16 translate[MAX_BONES];
-		std::vector< mesh_node_data > bones;
+		vector< mesh_node_data > bones;
 		const aiMesh*  mesh  = scene->mMeshes[ m ];
 		if ( mesh->mNumBones != 0 )
@@ -334,5 +334,5 @@
 	}
 	mesh_node_data* bones = new mesh_node_data[ final_bones.size() ];
-	std::copy( final_bones.begin(), final_bones.end(), bones );
+	nv::raw_copy( final_bones.begin(), final_bones.end(), bones );
 	return new mesh_nodes_data( "bones", final_bones.size(), bones );
 }
Index: trunk/src/formats/md2_loader.cc
===================================================================
--- trunk/src/formats/md2_loader.cc	(revision 382)
+++ trunk/src/formats/md2_loader.cc	(revision 383)
@@ -251,5 +251,5 @@
 	uint32 stats_collision  = 0;
 
-	std::vector< sint32 > index_translation( static_cast< uint32 >( md2->header.num_vertices ), -1 );
+	vector< sint32 > index_translation( static_cast< uint32 >( md2->header.num_vertices ), -1 );
 
 	m_new_indexes.clear();
@@ -364,5 +364,5 @@
 	{
 		uint16* icp = (uint16*)ic->data;
-		std::copy_n( m_new_indexes.data(), m_new_indexes.size(), icp );
+		raw_copy_n( m_new_indexes.data(), m_new_indexes.size(), icp );
 	}
 
Index: trunk/src/formats/md3_loader.cc
===================================================================
--- trunk/src/formats/md3_loader.cc	(revision 382)
+++ trunk/src/formats/md3_loader.cc	(revision 383)
@@ -198,5 +198,5 @@
 	md3->tags     = new md3_tag_t    [ md3->header.num_tags * md3->header.num_frames ];
 	md3->surfaces = new md3_surface_t[ md3->header.num_surfaces ];
-	std::memset( md3->surfaces, 0, static_cast< nv::size_t >( md3->header.num_surfaces ) * sizeof( md3_surface_t ) );
+	nv::raw_zero_n( md3->surfaces, static_cast< nv::size_t >( md3->header.num_surfaces ) );
 
 	source.seek( md3->header.ofs_frames, origin::SET );
@@ -285,5 +285,5 @@
 }
 
-nv::key_raw_channel* nv::md3_loader::load_tags( const std::string& tag )
+nv::key_raw_channel* nv::md3_loader::load_tags( const string_ref& tag )
 {
 	md3_t* md3 = (md3_t*)m_md3;
@@ -295,5 +295,5 @@
 		{
 			const md3_tag_t& rtag = md3->tags[i + md3->header.num_tags * f];
-			std::string rname((char*)(rtag.name));
+			string_ref rname((char*)(rtag.name));
 			if (rname == tag)
 			{
@@ -421,13 +421,13 @@
 	md3_t* md3 = (md3_t*)m_md3;
 	uint32 node_count = (uint32)md3->header.num_tags;
-	if ( node_count == 0 ) return nullptr;;
+	if ( node_count == 0 ) return nullptr;
 	mesh_node_data* nodes = new mesh_node_data[ node_count ];
 	for ( uint32 i = 0; i < node_count; ++i )
 	{
 		const md3_tag_t& rtag = md3->tags[i];
-		std::string name( (char*)(rtag.name) );
+		string_ref name( (char*)(rtag.name) );
 
 		nodes[i].transform = mat4();
-		nodes[i].name      = name;
+		nodes[i].name      = name.to_string();
 		nodes[i].parent_id = -1;
 		nodes[i].target_id = -1;
Index: trunk/src/formats/md5_loader.cc
===================================================================
--- trunk/src/formats/md5_loader.cc	(revision 382)
+++ trunk/src/formats/md5_loader.cc	(revision 383)
@@ -48,6 +48,6 @@
 
 	// MESH data
-	std::vector<md5_joint_info> joint_infos;
-	std::vector<transform>      base_frames;
+	dynamic_array< md5_joint_info > joint_infos;
+	vector< transform >             base_frames;
 	size_t num_animated_components = 0;
 	size_t frame_rate = 0;
@@ -301,5 +301,5 @@
 		else if ( command == "frame" )
 		{
-			std::vector<float> frame;
+			vector<float> frame;
 			uint32 frame_id;
 			sstream >> frame_id;
@@ -454,5 +454,5 @@
 }
 
-void md5_loader::build_frame_skeleton( mesh_node_data* nodes, uint32 index, const std::vector<md5_joint_info>& joint_infos, const std::vector<transform>& base_frames, const std::vector<float>& frame_data )
+void md5_loader::build_frame_skeleton( mesh_node_data* nodes, uint32 index, const const_array_ref<md5_joint_info>& joint_infos, const const_array_ref<transform>& base_frames, const const_array_ref<float>& frame_data )
 {
 	assert( m_type == ANIMATION );
Index: trunk/src/formats/nmd_loader.cc
===================================================================
--- trunk/src/formats/nmd_loader.cc	(revision 382)
+++ trunk/src/formats/nmd_loader.cc	(revision 383)
@@ -162,5 +162,5 @@
 static void nmd_dump_mesh( const mesh_data* mesh, stream& stream_out )
 {
-	const std::vector< mesh_raw_channel* >& data  = mesh->get_raw_channels();
+	const_array_ref< mesh_raw_channel* > data  = mesh->get_raw_channels();
 
 	uint32 size = sizeof( nmd_element_header );
Index: trunk/src/formats/obj_loader.cc
===================================================================
--- trunk/src/formats/obj_loader.cc	(revision 382)
+++ trunk/src/formats/obj_loader.cc	(revision 383)
@@ -44,7 +44,7 @@
 struct obj_reader
 {
-	std::vector< vec3 > v;
-	std::vector< vec3 > n;
-	std::vector< vec2 > t;
+	vector< vec3 > v;
+	vector< vec3 > n;
+	vector< vec2 > t;
 
 	std::string line;
@@ -204,5 +204,5 @@
 	}
 	bool m_normals;
-	std::vector< VTX > m_data;
+	vector< VTX > m_data;
 	virtual void reset() { m_data.clear(); }
 	virtual nv::size_t raw_size() const { return m_data.size() * sizeof( VTX ); }
@@ -228,14 +228,9 @@
 	void calculate_tangents()
 	{
-		//		const std::vector< vec3 >& vp = m_mesh->get_positions();
-		//		const std::vector< vec2 >& vt = m_mesh->get_texcoords();
-		//		const std::vector< vec3 >& vn = m_mesh->get_normals();
-		//		std::vector< vec3 >& tg = m_mesh->get_tangents();
-
 		nv::size_t count = m_data.size();
 		nv::size_t tcount = count / 3;
 
-		std::vector< vec3 > tan1( count );
-		std::vector< vec3 > tan2( count );
+		vector< vec3 > tan1( count );
+		vector< vec3 > tan2( count );
 
 		for ( nv::size_t a = 0; a < tcount; ++a )
@@ -335,5 +330,5 @@
 		{
 			data = new uint8[ reader->raw_size() ];
-			std::copy_n( reader->raw_pointer(), reader->raw_size(), data );
+			raw_copy_n( reader->raw_pointer(), reader->raw_size(), data );
 		}
 		channel->data  = data;
