diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 539fa4d..3c3b3c0 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -384,7 +384,7 @@
     return Object(objNull);
 }
 
-GfxPattern *GfxResources::lookupPattern(const char *name, OutputDev *out, GfxState *state)
+std::unique_ptr<GfxPattern> GfxResources::lookupPattern(const char *name, OutputDev *out, GfxState *state)
 {
     GfxResources *resPtr;
 
@@ -398,7 +398,7 @@
         }
     }
     error(errSyntaxError, -1, "Unknown pattern '{0:s}'", name);
-    return nullptr;
+    return {};
 }
 
 GfxShading *GfxResources::lookupShading(const char *name, OutputDev *out, GfxState *state)
@@ -1514,7 +1514,6 @@
 void Gfx::opSetFillColorN(Object args[], int numArgs)
 {
     GfxColor color;
-    GfxPattern *pattern;
     int i;
 
     if (state->getFillColorSpace()->getMode() == csPattern) {
@@ -1534,8 +1533,9 @@
             out->updateFillColor(state);
         }
         if (numArgs > 0) {
+            std::unique_ptr<GfxPattern> pattern;
             if (args[numArgs - 1].isName() && (pattern = res->lookupPattern(args[numArgs - 1].getName(), out, state))) {
-                state->setFillPattern(pattern);
+                state->setFillPattern(std::move(pattern));
             }
         }
 
@@ -1560,7 +1560,6 @@
 void Gfx::opSetStrokeColorN(Object args[], int numArgs)
 {
     GfxColor color;
-    GfxPattern *pattern;
     int i;
 
     if (state->getStrokeColorSpace()->getMode() == csPattern) {
@@ -1583,8 +1582,9 @@
             error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command");
             return;
         }
+        std::unique_ptr<GfxPattern> pattern;
         if (args[numArgs - 1].isName() && (pattern = res->lookupPattern(args[numArgs - 1].getName(), out, state))) {
-            state->setStrokePattern(pattern);
+            state->setStrokePattern(std::move(pattern));
         }
 
     } else {
diff --git a/poppler/Gfx.h b/poppler/Gfx.h
index fee97a7..77da7a6 100644
--- a/poppler/Gfx.h
+++ b/poppler/Gfx.h
@@ -123,7 +123,7 @@
     Object lookupXObjectNF(const char *name);
     Object lookupMarkedContentNF(const char *name);
     Object lookupColorSpace(const char *name);
-    GfxPattern *lookupPattern(const char *name, OutputDev *out, GfxState *state);
+    std::unique_ptr<GfxPattern> lookupPattern(const char *name, OutputDev *out, GfxState *state);
     GfxShading *lookupShading(const char *name, OutputDev *out, GfxState *state);
     Object lookupGState(const char *name);
     Object lookupGStateNF(const char *name);
diff --git a/poppler/GfxState.cc b/poppler/GfxState.cc
index 91544d9..ae5dcdd 100644
--- a/poppler/GfxState.cc
+++ b/poppler/GfxState.cc
@@ -3196,9 +3196,8 @@
 
 GfxPattern::~GfxPattern() { }
 
-GfxPattern *GfxPattern::parse(GfxResources *res, Object *obj, OutputDev *out, GfxState *state, int patternRefNum)
+std::unique_ptr<GfxPattern> GfxPattern::parse(GfxResources *res, Object *obj, OutputDev *out, GfxState *state, int patternRefNum)
 {
-    GfxPattern *pattern;
     Object obj1;
 
     if (obj->isDict()) {
@@ -3206,22 +3205,21 @@
     } else if (obj->isStream()) {
         obj1 = obj->streamGetDict()->lookup("PatternType");
     } else {
-        return nullptr;
+        return {};
     }
-    pattern = nullptr;
     if (obj1.isInt() && obj1.getInt() == 1) {
-        pattern = GfxTilingPattern::parse(obj, patternRefNum);
+        return GfxTilingPattern::parse(obj, patternRefNum);
     } else if (obj1.isInt() && obj1.getInt() == 2) {
-        pattern = GfxShadingPattern::parse(res, obj, out, state, patternRefNum);
+        return GfxShadingPattern::parse(res, obj, out, state, patternRefNum);
     }
-    return pattern;
+    return {};
 }
 
 //------------------------------------------------------------------------
 // GfxTilingPattern
 //------------------------------------------------------------------------
 
-GfxTilingPattern *GfxTilingPattern::parse(Object *patObj, int patternRefNum)
+std::unique_ptr<GfxTilingPattern> GfxTilingPattern::parse(Object *patObj, int patternRefNum)
 {
     Dict *dict;
     int paintTypeA, tilingTypeA;
@@ -3297,7 +3295,8 @@
         }
     }
 
-    return new GfxTilingPattern(paintTypeA, tilingTypeA, bboxA, xStepA, yStepA, &resDictA, matrixA, patObj, patternRefNum);
+    auto pattern = new GfxTilingPattern(paintTypeA, tilingTypeA, bboxA, xStepA, yStepA, &resDictA, matrixA, patObj, patternRefNum);
+    return std::unique_ptr<GfxTilingPattern>(pattern);
 }
 
 GfxTilingPattern::GfxTilingPattern(int paintTypeA, int tilingTypeA, const double *bboxA, double xStepA, double yStepA, const Object *resDictA, const double *matrixA, const Object *contentStreamA, int patternRefNumA)
@@ -3321,16 +3320,17 @@
 
 GfxTilingPattern::~GfxTilingPattern() { }
 
-GfxPattern *GfxTilingPattern::copy() const
+std::unique_ptr<GfxPattern> GfxTilingPattern::copy() const
 {
-    return new GfxTilingPattern(paintType, tilingType, bbox, xStep, yStep, &resDict, matrix, &contentStream, getPatternRefNum());
+    auto pattern = new GfxTilingPattern(paintType, tilingType, bbox, xStep, yStep, &resDict, matrix, &contentStream, getPatternRefNum());
+    return std::unique_ptr<GfxTilingPattern>(pattern);
 }
 
 //------------------------------------------------------------------------
 // GfxShadingPattern
 //------------------------------------------------------------------------
 
-GfxShadingPattern *GfxShadingPattern::parse(GfxResources *res, Object *patObj, OutputDev *out, GfxState *state, int patternRefNum)
+std::unique_ptr<GfxShadingPattern> GfxShadingPattern::parse(GfxResources *res, Object *patObj, OutputDev *out, GfxState *state, int patternRefNum)
 {
     Dict *dict;
     GfxShading *shadingA;
@@ -3339,14 +3339,14 @@
     int i;
 
     if (!patObj->isDict()) {
-        return nullptr;
+        return {};
     }
     dict = patObj->getDict();
 
     obj1 = dict->lookup("Shading");
     shadingA = GfxShading::parse(res, &obj1, out, state);
     if (!shadingA) {
-        return nullptr;
+        return {};
     }
 
     matrixA[0] = 1;
@@ -3365,7 +3365,8 @@
         }
     }
 
-    return new GfxShadingPattern(shadingA, matrixA, patternRefNum);
+    auto pattern = new GfxShadingPattern(shadingA, matrixA, patternRefNum);
+    return std::unique_ptr<GfxShadingPattern>(pattern);
 }
 
 GfxShadingPattern::GfxShadingPattern(GfxShading *shadingA, const double *matrixA, int patternRefNumA) : GfxPattern(2, patternRefNumA)
@@ -3383,9 +3384,10 @@
     delete shading;
 }
 
-GfxPattern *GfxShadingPattern::copy() const
+std::unique_ptr<GfxPattern> GfxShadingPattern::copy() const
 {
-    return new GfxShadingPattern(shading->copy(), matrix, getPatternRefNum());
+    auto pattern = new GfxShadingPattern(shading->copy(), matrix, getPatternRefNum());
+    return std::unique_ptr<GfxShadingPattern>(pattern);
 }
 
 //------------------------------------------------------------------------
@@ -6562,12 +6564,10 @@
     fillColor = state->fillColor;
     strokeColor = state->strokeColor;
 
-    fillPattern = state->fillPattern;
-    if (fillPattern) {
+    if (state->fillPattern) {
         fillPattern = state->fillPattern->copy();
     }
-    strokePattern = state->strokePattern;
-    if (strokePattern) {
+    if (state->strokePattern) {
         strokePattern = state->strokePattern->copy();
     }
     blendMode = state->blendMode;
@@ -6865,20 +6865,14 @@
     strokeColorSpace = std::move(colorSpace);
 }
 
-void GfxState::setFillPattern(GfxPattern *pattern)
+void GfxState::setFillPattern(std::unique_ptr<GfxPattern> &&pattern)
 {
-    if (fillPattern) {
-        delete fillPattern;
-    }
-    fillPattern = pattern;
+    fillPattern = std::move(pattern);
 }
 
-void GfxState::setStrokePattern(GfxPattern *pattern)
+void GfxState::setStrokePattern(std::unique_ptr<GfxPattern> &&pattern)
 {
-    if (strokePattern) {
-        delete strokePattern;
-    }
-    strokePattern = pattern;
+    strokePattern = std::move(pattern);
 }
 
 void GfxState::setFont(std::shared_ptr<GfxFont> fontA, double fontSizeA)
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index 4bf2b8f..797ad4d 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -787,9 +787,9 @@
     GfxPattern(const GfxPattern &) = delete;
     GfxPattern &operator=(const GfxPattern &other) = delete;
 
-    static GfxPattern *parse(GfxResources *res, Object *obj, OutputDev *out, GfxState *state, int patternRefNum);
+    static std::unique_ptr<GfxPattern> parse(GfxResources *res, Object *obj, OutputDev *out, GfxState *state, int patternRefNum);
 
-    virtual GfxPattern *copy() const = 0;
+    virtual std::unique_ptr<GfxPattern> copy() const = 0;
 
     int getType() const { return type; }
 
@@ -807,10 +807,10 @@
 class GfxTilingPattern : public GfxPattern
 {
 public:
-    static GfxTilingPattern *parse(Object *patObj, int patternRefNum);
+    static std::unique_ptr<GfxTilingPattern> parse(Object *patObj, int patternRefNum);
     ~GfxTilingPattern() override;
 
-    GfxPattern *copy() const override;
+    std::unique_ptr<GfxPattern> copy() const override;
 
     int getPaintType() const { return paintType; }
     int getTilingType() const { return tilingType; }
@@ -840,10 +840,10 @@
 class GfxShadingPattern : public GfxPattern
 {
 public:
-    static GfxShadingPattern *parse(GfxResources *res, Object *patObj, OutputDev *out, GfxState *state, int patternRefNum);
+    static std::unique_ptr<GfxShadingPattern> parse(GfxResources *res, Object *patObj, OutputDev *out, GfxState *state, int patternRefNum);
     ~GfxShadingPattern() override;
 
-    GfxPattern *copy() const override;
+    std::unique_ptr<GfxPattern> copy() const override;
 
     GfxShading *getShading() { return shading; }
     const double *getMatrix() const { return matrix; }
@@ -1506,8 +1506,8 @@
     void getStrokeDeviceN(GfxColor *deviceN) { strokeColorSpace->getDeviceN(&strokeColor, deviceN); }
     GfxColorSpace *getFillColorSpace() { return fillColorSpace.get(); }
     GfxColorSpace *getStrokeColorSpace() { return strokeColorSpace.get(); }
-    GfxPattern *getFillPattern() { return fillPattern; }
-    GfxPattern *getStrokePattern() { return strokePattern; }
+    GfxPattern *getFillPattern() { return fillPattern.get(); }
+    GfxPattern *getStrokePattern() { return strokePattern.get(); }
     GfxBlendMode getBlendMode() const { return blendMode; }
     double getFillOpacity() const { return fillOpacity; }
     double getStrokeOpacity() const { return strokeOpacity; }
@@ -1591,8 +1591,8 @@
     void setStrokeColorSpace(std::unique_ptr<GfxColorSpace> &&colorSpace);
     void setFillColor(const GfxColor *color) { fillColor = *color; }
     void setStrokeColor(const GfxColor *color) { strokeColor = *color; }
-    void setFillPattern(GfxPattern *pattern);
-    void setStrokePattern(GfxPattern *pattern);
+    void setFillPattern(std::unique_ptr<GfxPattern> &&pattern);
+    void setStrokePattern(std::unique_ptr<GfxPattern> &&pattern);
     void setBlendMode(GfxBlendMode mode) { blendMode = mode; }
     void setFillOpacity(double opac) { fillOpacity = opac; }
     void setStrokeOpacity(double opac) { strokeOpacity = opac; }
@@ -1719,8 +1719,8 @@
     std::unique_ptr<GfxColorSpace> strokeColorSpace; // stroke color space
     GfxColor fillColor; // fill color
     GfxColor strokeColor; // stroke color
-    GfxPattern *fillPattern; // fill pattern
-    GfxPattern *strokePattern; // stroke pattern
+    std::unique_ptr<GfxPattern> fillPattern; // fill pattern
+    std::unique_ptr<GfxPattern> strokePattern; // stroke pattern
     GfxBlendMode blendMode; // transparency blend mode
     double fillOpacity; // fill opacity
     double strokeOpacity; // stroke opacity
