vcl/osx/a11ytextattributeswrapper.mm | 1 + vcl/osx/a11ywrapper.mm | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-)
New commits: commit cb4fb9e31e42ed719f435919d1ca671ba2d66863 Author: Patrick Luby <plub...@neooffice.org> AuthorDate: Sun May 28 09:49:52 2023 -0300 Commit: Patrick Luby <plub...@neooffice.org> CommitDate: Mon May 29 01:10:01 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> (cherry picked from commit 7ae89a2ad89c9e7702fbd2b31269ee4c61fe5bcb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152316 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 cb6fca0a9e29..96de29e07f77 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 ];