Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
permission_handler
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songyanzhi
permission_handler
Commits
9ebf277e
Unverified
Commit
9ebf277e
authored
Jul 27, 2021
by
Maurits van Beusekom
Committed by
GitHub
Jul 27, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory dereference error (#640)
parent
f8fc0d9f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
permission_handler/CHANGELOG.md
+4
-0
permission_handler/ios/Classes/PermissionManager.m
+6
-2
permission_handler/pubspec.yaml
+1
-1
No files found.
permission_handler/CHANGELOG.md
View file @
9ebf277e
## 8.1.4+2
*
iOS: fixed memory error that occurred on iOS 12.2 and below (see issue
[
#638
](
https://github.com/Baseflow/flutter-permission-handler/issues/638
)
).
## 8.1.4+1
## 8.1.4+1
*
Fix a bug where after allowing the
`location`
permission and requesting it again would lead to a memory error.
*
Fix a bug where after allowing the
`location`
permission and requesting it again would lead to a memory error.
...
...
permission_handler/ios/Classes/PermissionManager.m
View file @
9ebf277e
...
@@ -55,12 +55,16 @@
...
@@ -55,12 +55,16 @@
[
requestQueue
removeObject
:
@
(
permission
)];
[
requestQueue
removeObject
:
@
(
permission
)];
[
self
->
_strategyInstances
removeObject
:
permissionStrategy
];
[
self
->
_strategyInstances
removeObject
:
permissionStrategy
];
permissionStrategy
=
nil
;
if
(
requestQueue
.
count
==
0
)
{
if
(
requestQueue
.
count
==
0
)
{
completion
(
permissionStatusResult
);
completion
(
permissionStatusResult
);
return
;
}
}
// Make sure `completion` is called before cleaning up the reference
// otherwise the `completion` block is also dereferenced on iOS 12 and
// below (this is most likely a bug in Objective-C which is solved in
// later versions of the runtime).
permissionStrategy
=
nil
;
}];
}];
}
}
}
}
...
...
permission_handler/pubspec.yaml
View file @
9ebf277e
name
:
permission_handler
name
:
permission_handler
description
:
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
description
:
Permission plugin for Flutter. This plugin provides a cross-platform (iOS, Android) API to request and check permissions.
version
:
8.1.4+
1
version
:
8.1.4+
2
homepage
:
https://github.com/baseflowit/flutter-permission-handler
homepage
:
https://github.com/baseflowit/flutter-permission-handler
flutter
:
flutter
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment