summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Luby <plubius@neooffice.org>2023-05-28 09:49:52 -0300
committerAndras Timar <andras.timar@collabora.com>2023-06-04 16:34:07 +0200
commita8c696d9dd6b8573f755b46b1bc6f5cf3950daca (patch)
tree648e27498073f34b20912a20cfb5ad076dd4e4c5
parent6b91937197eef9f12bb4e03d543210489393fa39 (diff)
Related tdf#tdf155376 fix minor memory leaks
Change-Id: I9cdc5fb38ffba113e3d069d9d766dbe1a82c492d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152352 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
-rw-r--r--vcl/osx/a11ytextattributeswrapper.mm1
-rw-r--r--vcl/osx/a11ywrapper.mm2
2 files changed, 2 insertions, 1 deletions
diff --git a/vcl/osx/a11ytextattributeswrapper.mm b/vcl/osx/a11ytextattributeswrapper.mm
index 9db1ba91307d..8a8afe9a154b 100644
--- a/vcl/osx/a11ytextattributeswrapper.mm
+++ b/vcl/osx/a11ytextattributeswrapper.mm
@@ -315,6 +315,7 @@ using namespace ::com::sun::star::uno;
try {
NSString * myString = CreateNSString ( [ wrapper accessibleText ] -> getText() ); // TODO: dirty fix for i87817
string = [ [ NSMutableAttributedString alloc ] initWithString: CreateNSString ( [ wrapper accessibleText ] -> getTextRange ( loc, loc + len ) ) ];
+ [ string autorelease ];
if ( [ wrapper accessibleTextAttributes ] && [myString characterAtIndex:0] != 57361) { // TODO: dirty fix for i87817
[ string beginEditing ];
// add default attributes for whole string
diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index c4beeb5b0567..7cd6b70cc1f4 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -855,7 +855,7 @@ static std::ostream &operator<<(std::ostream &s, NSObject *obj) {
SolarMutexGuard aGuard;
SAL_INFO("vcl.a11y", "[" << self << " accessibilityParameterizedAttributeNames]");
- NSMutableArray * attributeNames = [ [ NSMutableArray alloc ] init ];
+ NSMutableArray * attributeNames = [ NSMutableArray array ];
// Special Attributes depending on interface
if ( [ self accessibleText ] ) {
[ AquaA11yTextWrapper addParameterizedAttributeNamesTo: attributeNames ];