vcl/osx/a11ytextattributeswrapper.mm |    1 +
 vcl/osx/a11ywrapper.mm               |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 37bcbfe633897820189d3c77bd69b7a796afbca4
Author:     Patrick Luby <plub...@neooffice.org>
AuthorDate: Sun May 28 09:49:52 2023 -0300
Commit:     Patrick Luby <plub...@neooffice.org>
CommitDate: Sun May 28 18:02:17 2023 +0200

    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 <plub...@neooffice.org>

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 
];

Reply via email to