Skip to content

Commit 69c9578

Browse files
committed
Added virtual dtors where needed. Resolves issue #4.
1 parent bf134b7 commit 69c9578

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

win32/N3888_RefImpl/drawing.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,8 @@ namespace std {
439439
font_face& operator=(font_face&& other);
440440

441441
explicit font_face(native_handle_type nh);
442+
443+
virtual ~font_face();
442444
};
443445

444446
class scaled_font {
@@ -581,6 +583,8 @@ namespace std {
581583
pattern(pattern&& other);
582584
pattern& operator=(pattern&& other);
583585

586+
virtual ~pattern();
587+
584588
status status();
585589
void set_extend(extend extend);
586590
extend get_extend();
@@ -616,6 +620,8 @@ namespace std {
616620
gradient_pattern& operator=(const gradient_pattern&) = default;
617621
gradient_pattern(gradient_pattern&& other);
618622
gradient_pattern& operator=(gradient_pattern&& other);
623+
virtual ~gradient_pattern();
624+
619625
void add_color_stop_rgb(double offset, double red, double green, double blue);
620626
void add_color_stop_rgba(double offset, double red, double green, double blue, double alpha);
621627
void get_color_stop_count(int& count);

win32/N3888_RefImpl/font_face.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ font_face& font_face::operator=(font_face&& other) {
2424
font_face::font_face(font_face::native_handle_type nh) {
2525
_Font_face = shared_ptr<cairo_font_face_t>(nh, &cairo_font_face_destroy);
2626
}
27+
28+
font_face::~font_face() {
29+
}

win32/N3888_RefImpl/gradient_pattern.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ gradient_pattern& gradient_pattern::operator=(gradient_pattern&& other) {
1818
return *this;
1919
}
2020

21+
gradient_pattern::~gradient_pattern() {
22+
}
23+
2124
void gradient_pattern::add_color_stop_rgb(double offset, double red, double green, double blue) {
2225
cairo_pattern_add_color_stop_rgb(_Pattern.get(), offset, red, green, blue);
2326
}

win32/N3888_RefImpl/pattern.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ pattern& pattern::operator=(pattern&& other) {
3131
return *this;
3232
}
3333

34+
pattern::~pattern() {
35+
}
36+
3437
status pattern::status() {
3538
return _Cairo_status_t_to_status(cairo_pattern_status(_Pattern.get()));
3639
}

0 commit comments

Comments
 (0)