Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Honas

Member Since 18 Jan 2011
Offline Last Active May 17 2012 02:50 PM

Posts I've Made

In Topic: Need help with the last drip of a memory leak

04 April 2012 - 02:22 PM

First of all: Thank you for replying! Posted Image
I changed my BoneMesh in SkinnedMesh.h like this:

struct BoneMesh: public D3DXMESHCONTAINER
{
	 ID3DXMesh* OriginalMesh;
	 vector<D3DMATERIAL9> materials;
	 vector<IDirect3DTexture9*> textures;
	 DWORD NumAttributeGroups;
	 D3DXATTRIBUTERANGE* attributeTable;
	 D3DXMATRIX** boneMatrixPtrs;
	 D3DXMATRIX* boneOffsetMatrices;
	 D3DXMATRIX* currentBoneMatrices;
	 BoneMesh(){}
	 ~BoneMesh()
	 {
			delete [] attributeTable;
			delete [] boneOffsetMatrices;
			delete [] currentBoneMatrices;
			delete [] boneMatrixPtrs;
			attributeTable = 0;
			boneOffsetMatrices = 0;
			currentBoneMatrices = 0;
			boneMatrixPtrs = 0;
	 }
};

MEMORY  : Memory leaks detected!
27 active allocations totalling 652 bytes:
+ ID 00000045, tag ID 0x00000000: 0x01053E44 160 bytes [thegame.cpp:250 (InitTerrain)]
+ ID 00000393, tag ID 0x00000000: 0x0105427C 44 bytes [gameobject.cpp:459 (createCube)]
+ ID 00000394, tag ID 0x00000000: 0x01057D44 20 bytes [gameobject.cpp:459 (createCube)]
+ ID 00000404, tag ID 0x00000000: 0x01054564 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000405, tag ID 0x00000000: 0x0105464C 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000414, tag ID 0x00000000: 0x01054DDC 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000415, tag ID 0x00000000: 0x08E10244 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000424, tag ID 0x00000000: 0x08E10BF4 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000425, tag ID 0x00000000: 0x08E10CDC 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000434, tag ID 0x00000000: 0x08E1168C 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000435, tag ID 0x00000000: 0x08E11774 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000444, tag ID 0x00000000: 0x08E12124 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000445, tag ID 0x00000000: 0x08E1220C 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
+ ID 00000456, tag ID 0x00000000: 0x08E12C84 4 bytes [gameobject.cpp:459 (createCube)]
+ ID 00000457, tag ID 0x00000000: 0x08E12D64 32 bytes [gameobject.cpp:459 (createCube)]
+ ID 00000459, tag ID 0x00000000: 0x08E12F44 44 bytes [gameobject.cpp:479 (createBase)]
+ ID 00000460, tag ID 0x00000000: 0x08E1304C 12 bytes [gameobject.cpp:479 (createBase)]
+ ID 00000461, tag ID 0x00000000: 0x08E13134 44 bytes [gameobject.cpp:363 (BaseGraphicsComponent::BaseGraphicsComponent)]
+ ID 00000462, tag ID 0x00000000: 0x08E1323C 44 bytes [gameobject.cpp:372 (BaseGraphicsComponent::BaseGraphicsComponent)]
+ ID 00000463, tag ID 0x00000000: 0x08E13344 4 bytes [gameobject.cpp:479 (createBase)]
+ ID 00000464, tag ID 0x00000000: 0x08E13424 8 bytes [gameobject.cpp:479 (createBase)]
+ ID 00000466, tag ID 0x00000000: 0x08E135F4 44 bytes [gameobject.cpp:479 (createBase)]
+ ID 00000467, tag ID 0x00000000: 0x08E136FC 12 bytes [gameobject.cpp:479 (createBase)]
+ ID 00000468, tag ID 0x00000000: 0x08E137E4 44 bytes [gameobject.cpp:363 (BaseGraphicsComponent::BaseGraphicsComponent)]
+ ID 00000469, tag ID 0x00000000: 0x08E138EC 44 bytes [gameobject.cpp:372 (BaseGraphicsComponent::BaseGraphicsComponent)]
+ ID 00000470, tag ID 0x00000000: 0x08E12E64 4 bytes [gameobject.cpp:479 (createBase)]
+ ID 00000471, tag ID 0x00000000: 0x08E139F4 8 bytes [gameobject.cpp:479 (createBase)]
End of allocations
Memory leaks were foundTheGame (Debug) .exe has triggered a breakpoint
The thread 'Win32 Thread' (0xdf8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xe74) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x112c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xc94) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x118c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1330) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0xa30) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x12ac) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2b8) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x13cc) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x124c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x828) has exited with code 0 (0x0).
Direct3D9: (ERROR) :Memory still allocated!  Alloc count = 189
Direct3D9: (ERROR) :Current Process (pid) = 000013d4
Direct3D9: (ERROR) :Memory Address: 058e07fc lAllocID=1 dwSize=00004bc4, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e53f4 lAllocID=2 dwSize=00000350, ReturnAddr=6bbf02fa (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e577c lAllocID=3 dwSize=00000ef0, ReturnAddr=6bbf6401 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0591434c lAllocID=5 dwSize=000242b4, ReturnAddr=6bbfe508 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05938634 lAllocID=6 dwSize=00001bd8, ReturnAddr=6bbeec04 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e66a4 lAllocID=7 dwSize=000005e0, ReturnAddr=6bbeecd5 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e6cbc lAllocID=8 dwSize=00000014, ReturnAddr=6bbeed27 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f0064 lAllocID=12 dwSize=00001950, ReturnAddr=6bbe3cab (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0593a244 lAllocID=13 dwSize=000005e0, ReturnAddr=6bbe3cf1 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e6dc4 lAllocID=14 dwSize=00000014, ReturnAddr=6bbe3d3e (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0593a85c lAllocID=15 dwSize=00000350, ReturnAddr=6bbf02fa (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f19ec lAllocID=16 dwSize=00000ef0, ReturnAddr=6bbf6401 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0593abe4 lAllocID=18 dwSize=0001bd28, ReturnAddr=6bbfe508 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f2914 lAllocID=19 dwSize=00001bd8, ReturnAddr=6bbeec04 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05956944 lAllocID=20 dwSize=000005c0, ReturnAddr=6bbeecd5 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05956f3c lAllocID=21 dwSize=00000014, ReturnAddr=6bbeed27 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f4524 lAllocID=23 dwSize=00001950, ReturnAddr=6bbe3cab (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f5eac lAllocID=24 dwSize=000005c0, ReturnAddr=6bbe3cf1 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05956f84 lAllocID=25 dwSize=00000014, ReturnAddr=6bbe3d3e (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e6e0c lAllocID=26 dwSize=00000044, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e6e84 lAllocID=27 dwSize=00000050, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f682c lAllocID=35 dwSize=00000ef0, ReturnAddr=6bbf6401 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e6f0c lAllocID=36 dwSize=00000030, ReturnAddr=6bc00881 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f7754 lAllocID=37 dwSize=00001bd8, ReturnAddr=6bbeec04 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f9364 lAllocID=38 dwSize=000005e0, ReturnAddr=6bbeecd5 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e6f74 lAllocID=39 dwSize=00000014, ReturnAddr=6bbeed27 (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f997c lAllocID=41 dwSize=00004138, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058fdaec lAllocID=42 dwSize=00000198, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f64a4 lAllocID=43 dwSize=00000030, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058fdcbc lAllocID=44 dwSize=00001020, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058fed14 lAllocID=45 dwSize=00000a48, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f650c lAllocID=46 dwSize=00000098, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f65dc lAllocID=47 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f668c lAllocID=48 dwSize=00000024, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f66e4 lAllocID=49 dwSize=00000098, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ff794 lAllocID=50 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058f67b4 lAllocID=51 dwSize=00000044, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ff844 lAllocID=52 dwSize=00000024, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ff89c lAllocID=53 dwSize=000000a8, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ff97c lAllocID=54 dwSize=00000098, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ffa4c lAllocID=55 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05956fcc lAllocID=56 dwSize=0002b330, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982334 lAllocID=57 dwSize=0000002c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982394 lAllocID=58 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059823f4 lAllocID=59 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0598284c lAllocID=60 dwSize=00000030, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059828b4 lAllocID=61 dwSize=00000030, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ffafc lAllocID=62 dwSize=00001020, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0598291c lAllocID=63 dwSize=00000120, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982a74 lAllocID=64 dwSize=00000060, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05900b54 lAllocID=65 dwSize=00000e20, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982b0c lAllocID=66 dwSize=00000120, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982c64 lAllocID=67 dwSize=00000060, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059019ac lAllocID=68 dwSize=000003ec, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982cfc lAllocID=69 dwSize=00000050, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982d84 lAllocID=70 dwSize=00000050, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982e0c lAllocID=71 dwSize=00000050, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982e94 lAllocID=72 dwSize=00000050, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982f1c lAllocID=73 dwSize=00000048, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05901dcc lAllocID=74 dwSize=00000054, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05901e54 lAllocID=75 dwSize=00000048, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05901ed4 lAllocID=78 dwSize=000000b8, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05901fc4 lAllocID=79 dwSize=00010020, ReturnAddr=6bbed65a (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0591201c lAllocID=80 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059120cc lAllocID=81 dwSize=000000c0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059121c4 lAllocID=82 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05912274 lAllocID=83 dwSize=000000c0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0591236c lAllocID=84 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0591241c lAllocID=85 dwSize=000000b0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05912504 lAllocID=86 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059125b4 lAllocID=87 dwSize=00000050, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05982f9c lAllocID=88 dwSize=0000002c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0591263c lAllocID=89 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0591269c lAllocID=90 dwSize=0000002c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058e6fbc lAllocID=91 dwSize=0000517c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059126fc lAllocID=92 dwSize=00001020, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05913754 lAllocID=93 dwSize=0000003c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05983004 lAllocID=94 dwSize=00004020, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059137c4 lAllocID=95 dwSize=0000003c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ec16c lAllocID=96 dwSize=0000183c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0598705c lAllocID=97 dwSize=0000fab8, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05913834 lAllocID=98 dwSize=00000068, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059138d4 lAllocID=99 dwSize=00000140, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05913a4c lAllocID=100 dwSize=0000003c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05996b4c lAllocID=101 dwSize=00004020, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05913abc lAllocID=102 dwSize=0000003c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599aba4 lAllocID=103 dwSize=0000183c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05913b2c lAllocID=104 dwSize=0000021c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05913d7c lAllocID=105 dwSize=00000224, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05913fd4 lAllocID=106 dwSize=0000003c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05914044 lAllocID=107 dwSize=00000060, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059141ac lAllocID=109 dwSize=00000050, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 05914234 lAllocID=110 dwSize=00000038, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c414 lAllocID=111 dwSize=00000080, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059142a4 lAllocID=112 dwSize=0000002c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c4cc lAllocID=113 dwSize=00000040, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c544 lAllocID=114 dwSize=00000040, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c5bc lAllocID=115 dwSize=00000040, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c634 lAllocID=116 dwSize=00000060, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c6cc lAllocID=117 dwSize=00000030, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ed9dc lAllocID=118 dwSize=00000b38, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ee54c lAllocID=119 dwSize=00001020, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c734 lAllocID=120 dwSize=00000120, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c88c lAllocID=121 dwSize=00000060, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599c924 lAllocID=122 dwSize=00001020, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ef5a4 lAllocID=123 dwSize=00000120, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ef6fc lAllocID=124 dwSize=00000060, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058ef794 lAllocID=125 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058efbec lAllocID=126 dwSize=000000e4, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058efd04 lAllocID=127 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0599d97c lAllocID=128 dwSize=000053c0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059a2d74 lAllocID=129 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059a31cc lAllocID=130 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058efd64 lAllocID=131 dwSize=000001a0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 058eff3c lAllocID=133 dwSize=00000040, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059a8d24 lAllocID=549 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059a917c lAllocID=550 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059a9f04 lAllocID=557 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059aa35c lAllocID=558 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059ab06c lAllocID=592 dwSize=00000054, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059ab5f4 lAllocID=593 dwSize=00000080, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059ed46c lAllocID=659 dwSize=00000054, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059ed4f4 lAllocID=660 dwSize=00000080, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0ad2cb34 lAllocID=2383 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0ad2cf8c lAllocID=2384 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0ad2e96c lAllocID=2462 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0ad2edc4 lAllocID=2463 dwSize=00000420, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb345c lAllocID=3182 dwSize=000000b8, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb354c lAllocID=3183 dwSize=000000a0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3624 lAllocID=3184 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb36d4 lAllocID=3185 dwSize=0000005c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3764 lAllocID=3186 dwSize=00000044, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb37dc lAllocID=3187 dwSize=00000024, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3834 lAllocID=3188 dwSize=00000112, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb397c lAllocID=3191 dwSize=000000a8, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3a5c lAllocID=3192 dwSize=00000068, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3afc lAllocID=3193 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3bac lAllocID=3194 dwSize=00000060, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3c44 lAllocID=3195 dwSize=00000044, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3cbc lAllocID=3196 dwSize=00000024, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3d14 lAllocID=3197 dwSize=00000112, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3e5c lAllocID=3200 dwSize=000000b8, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb3f4c lAllocID=3201 dwSize=000000a0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb4024 lAllocID=3202 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb40d4 lAllocID=3203 dwSize=0000005c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb4164 lAllocID=3204 dwSize=00000044, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb41dc lAllocID=3205 dwSize=00000024, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb4234 lAllocID=3206 dwSize=00000112, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb437c lAllocID=3209 dwSize=000000a8, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb445c lAllocID=3210 dwSize=00000068, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb44fc lAllocID=3211 dwSize=0000007c, ReturnAddr=6bc0a22b (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb45ac lAllocID=3212 dwSize=00000060, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb4644 lAllocID=3213 dwSize=00000044, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb46bc lAllocID=3214 dwSize=00000024, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb4714 lAllocID=3215 dwSize=00000112, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0ad2e3dc lAllocID=3216 dwSize=00000010, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb485c lAllocID=3217 dwSize=000001a0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb4a34 lAllocID=3219 dwSize=00000038, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb9144 lAllocID=3343 dwSize=00000054, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb91cc lAllocID=3344 dwSize=00000080, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc2ee4 lAllocID=3600 dwSize=0000018c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc30a4 lAllocID=3601 dwSize=000005c4, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adb967c lAllocID=3602 dwSize=0000003c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059ec8fc lAllocID=3603 dwSize=00000048, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adbcf14 lAllocID=3604 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059ec97c lAllocID=3605 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc369c lAllocID=3606 dwSize=0000003c, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc370c lAllocID=3607 dwSize=000000a0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059ec9dc lAllocID=3608 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc37e4 lAllocID=3609 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc3844 lAllocID=3610 dwSize=00000090, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc390c lAllocID=3611 dwSize=00000044, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc3984 lAllocID=3612 dwSize=000001e0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc3b9c lAllocID=3613 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc3c5c lAllocID=3615 dwSize=00000084, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 059aa964 lAllocID=3623 dwSize=00000028, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc2e64 lAllocID=3633 dwSize=00000038, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc49a4 lAllocID=3638 dwSize=000009d4, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc5f7c lAllocID=3644 dwSize=000009d4, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc2c34 lAllocID=3648 dwSize=00000090, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc2d7c lAllocID=3652 dwSize=00000090, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc5884 lAllocID=3701 dwSize=000001a0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0ad6d314 lAllocID=3703 dwSize=00000038, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc5a5c lAllocID=3704 dwSize=00000054, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc5ae4 lAllocID=3705 dwSize=00000080, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc5b9c lAllocID=3706 dwSize=000001a0, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc5d74 lAllocID=3708 dwSize=00000040, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc7124 lAllocID=3713 dwSize=00000080, ReturnAddr=6bbed5ea (pid=000013d4)
Direct3D9: (ERROR) :Memory Address: 0adc71dc lAllocID=3714 dwSize=0000007c, ReturnAddr=6bc0b592 (pid=000013d4)
Direct3D9: (ERROR) :Total Memory Unfreed From Current Process = 814560 bytes
D3DX: MEMORY LEAKS DETECTED: 2 allocations unfreed (182 bytes)
D3DX: Set HKLM\Software\Microsoft\Direct3D\D3DXBreakOnAllocId=0x10b4 to debug
The program '[5076] TheGame (Debug) .exe: Native' has exited with code 0 (0x0).

Allocations from the checker are down by 20! I am not sure, if I delete boneMatrixPtrs the right way...
Also,
+ ID 00000404, tag ID 0x00000000: 0x02824564 8 bytes [skinnedmesh.h:36 (BoneMesh::BoneMesh)]
points to BoneMesh(){}. Why?
I can provide you a stripped down program, if that would be helpful.

In Topic: Problem with forward declarations and #includes

21 March 2012 - 01:55 PM

You guys nailed it, thank you so much! I was unaware of the fact, that I still have to include the header in my cpp file.

In Topic: Passing an object to another class

02 March 2012 - 06:56 AM

Your SubGrid type is an inner class of Terrain. However, it has no relationship with the parent class. That is, a SubGrid isn't associated with any particular Terrain instance. One solution is to put a pointer to Terrain in the SubGrid (intiialised in the constructor). The operator<() can use this pointer to access the camera.

As Washu correctly points out - this is a basic language issue.


Well I took out everything that is not part of the problem.

No, there is still a huge amount of code in that that is nothing to do with the problem. This is what the code would look like if you had taken everything out:

#ifndef CAMERA_H
#define CAMERA_H

class Camera
{
	bool example;
};

#endif

#ifndef TERRAIN_H
#define TERRAIN_H

class Terrain
{
public:
	Terrain(Camera &camera);

	class SubGrid
	{
		bool operator<(const SubGrid &other) const;
	};
private:
	Camera &camera;
};

#endif

#include "terrain.h"

Terrain::Terrain(Camera &camera) : camera(camera)
{
}

bool Terrain::SubGrid::operator<(const SubGrid &other) const
{
	return camera.example;
}

int main()
{

}
This code distils the essence of your problem - it should generate exactly the error you were looking at.

Also note that the code dump you gave is not properly indented, which makes it very difficult to decipher. Once again, having less code would make this less of an issue.

As an aside, it is usually a good idea to not use references as members. References have strange semantics as members because they are not reseatable. Instead, convert the reference to a pointer. The constructor can still take a reference, which neatly documents the intent of the class.


Thank you!

In Topic: Passing an object to another class

01 March 2012 - 05:20 PM

The reason my problem actually exists is because I do not want to use my camera class globally, like in Luna's initial code example.

In Topic: Passing an object to another class

01 March 2012 - 04:38 PM

Look up the error code, it tells you EXACTLY what's wrong.


I've looked into it before and I am still clueless.
SubGrid does not know mCamera. Using Terrain::mCamera does not work. Making mCamera static also. :/ Thanks for your help, though.
It says: "Camera & Terrain::mCamera Error: a nonstatic member reference must be relative to a specific object"
But this gets called after the constructor where I pass the specific object (the reference) to mCamera. I'm clueless.

PARTNERS