-static std::auto_ptr<QWindowsMimeMetafile> metafileWindowsMime;
+static QWindowsMimeMetafile * metafileWindowsMime;
-static std::auto_ptr<QMacPasteboardMimeGraphics> graphicsPasteboardMime;
+static QMacPasteboardMimeGraphics * graphicsPasteboardMime;
on_dataChanged();
#ifdef Q_WS_MACX
on_dataChanged();
#ifdef Q_WS_MACX
- if (!graphicsPasteboardMime.get())
- graphicsPasteboardMime.reset(new QMacPasteboardMimeGraphics());
+ if (!graphicsPasteboardMime)
+ graphicsPasteboardMime = new QMacPasteboardMimeGraphics();
#endif // Q_WS_MACX
#ifdef Q_WS_WIN
#endif // Q_WS_MACX
#ifdef Q_WS_WIN
- if (!metafileWindowsMime.get())
- metafileWindowsMime.reset(new QWindowsMimeMetafile());
+ if (!metafileWindowsMime)
+ metafileWindowsMime = new QWindowsMimeMetafile();
#endif // Q_WS_WIN
}
GuiClipboard::~GuiClipboard()
{
#endif // Q_WS_WIN
}
GuiClipboard::~GuiClipboard()
{
+#ifdef Q_WS_WIN
+ if (metafileWindowsMime) {
+ delete metafileWindowsMime;
+ metafileWindowsMime = 0;
+ }
+#endif // Q_WS_WIN
#ifdef Q_WS_MACX
closeAllLinkBackLinks();
#ifdef Q_WS_MACX
closeAllLinkBackLinks();
+ if (graphicsPasteboardMime) {
+ delete graphicsPasteboardMime;
+ graphicsPasteboardMime = 0;
+ }