Right, that's all working. All "new" with SFML stuff is gone. Happy days. Well almost.
My sprites and other data/functions I need are contained in a "SpriteObj" class, and I create an instance of this for each sprite. Fine.
When I call the destructor, it breaks with a heap pointer error. Here's the call stack trace. Any ideas?? I know I shouldn't use it but I don't know how to do this any other way!
ntdll.dll!77ea0844()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77e62a74()
ntdll.dll!77e1cd87()
KernelBase.dll!7617468e()
PR1027.exe!_CrtIsValidHeapPointer(const void * pUserData=0x04335f00) Line 2072 C++
PR1027.exe!_free_dbg_nolock(void * pUserData=0x04335f00, int nBlockUse=1) Line 1279 + 0x9 bytes C++
PR1027.exe!_free_dbg(void * pUserData=0x04335f00, int nBlockUse=1) Line 1220 + 0xd bytes C++
PR1027.exe!operator delete(void * pUserData=0x04335f00) Line 54 + 0x10 bytes C++
PR1027.exe!std::allocator<std::_Tree_nod<std::_Tset_traits<sf::ResourcePtr<sf::Image> *,std::less<sf::ResourcePtr<sf::Image> *>,std::allocator<sf::ResourcePtr<sf::Image> *>,0> >::_Node>::deallocate(std::_Tree_nod<std::_Tset_traits<sf::ResourcePtr<sf::Image> *,std::less<sf::ResourcePtr<sf::Image> *>,std::allocator<sf::ResourcePtr<sf::Image> *>,0> >::_Node * _Ptr=0x04335f00, unsigned int __formal=1) Line 141 + 0x9 bytes C++
PR1027.exe!std::_Tree<std::_Tset_traits<sf::ResourcePtr<sf::Image> *,std::less<sf::ResourcePtr<sf::Image> *>,std::allocator<sf::ResourcePtr<sf::Image> *>,0> >::erase(std::_Tree<std::_Tset_traits<sf::ResourcePtr<sf::Image> *,std::less<sf::ResourcePtr<sf::Image> *>,std::allocator<sf::ResourcePtr<sf::Image> *>,0> >::iterator _Where=0x0426c7e4 {myResource=0x04267dd4 }) Line 910 C++
PR1027.exe!std::_Tree<std::_Tset_traits<sf::ResourcePtr<sf::Image> *,std::less<sf::ResourcePtr<sf::Image> *>,std::allocator<sf::ResourcePtr<sf::Image> *>,0> >::erase(std::_Tree<std::_Tset_traits<sf::ResourcePtr<sf::Image> *,std::less<sf::ResourcePtr<sf::Image> *>,std::allocator<sf::ResourcePtr<sf::Image> *>,0> >::iterator _First=0x0426c7e4 {myResource=0x04267dd4 }, std::_Tree<std::_Tset_traits<sf::ResourcePtr<sf::Image> *,std::less<sf::ResourcePtr<sf::Image> *>,std::allocator<sf::ResourcePtr<sf::Image> *>,0> >::iterator _Last=0x0426c7e4 {myResource=0x04267dd4 }) Line 926 + 0x3f bytes C++
PR1027.exe!std::_Tree<std::_Tset_traits<sf::ResourcePtr<sf::Image> *,std::less<sf::ResourcePtr<sf::Image> *>,std::allocator<sf::ResourcePtr<sf::Image> *>,0> >::erase(sf::ResourcePtr<sf::Image> * const & _Keyval=0x0426c244) Line 936 + 0x67 bytes C++
> PR1027.exe!sf::Resource<sf::Image>::Disconnect(sf::ResourcePtr<sf::Image> & Observer={...}) Line 88 C++
PR1027.exe!sf::ResourcePtr<sf::Image>::~ResourcePtr<sf::Image>() Line 69 C++
PR1027.exe!sf::Sprite::~Sprite() + 0x5b bytes C++
PR1027.exe!SpriteObj::~SpriteObj() Line 35 + 0x21 bytes C++