|I see the problem; my bad for missing it in your original question. Your function has the signature:
Void Delete_Stuff( WCHAR * name, void * item )
so when you call
delete item the compiler has no idea what type
item is, so just throws it away. You can only call
delete on an object, when it is specifically typed so the compiler knows how to deal with it. You may try casting it to the relevant class type, but you would need some way of telling your function what type each pointer is.