Repository: incubator-weex Updated Branches: refs/heads/0.16-dev 3f32c552d -> 5dbcb878d
+ [ios] update tracing Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/3c2ce63f Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/3c2ce63f Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/3c2ce63f Branch: refs/heads/0.16-dev Commit: 3c2ce63f3c250be16d9c630ad20b86f0ea6e9ae7 Parents: 5e245cc Author: é½å±± <sunjjb...@163.com> Authored: Fri Sep 1 17:27:34 2017 +0800 Committer: é½å±± <sunjjb...@163.com> Committed: Fri Sep 1 17:27:34 2017 +0800 ---------------------------------------------------------------------- ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h | 5 +++++ ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m | 11 +++++++++++ ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m | 4 ++++ 3 files changed, 20 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3c2ce63f/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h index 48c1eba..1ad53e7 100644 --- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h +++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.h @@ -148,4 +148,9 @@ typedef enum : NSUInteger { */ + (void)commitTracingSummaryInfo:(NSDictionary *)info withInstanceId:(NSString *)instanceId; +/** + * @discusstion destroy Traincg Task by Instance + * @param instanceId the instanceId. + */ ++(void)destroyTraincgTaskWithInstance:(NSString *)instanceId; @end http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3c2ce63f/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m index e546bfc..17b46a0 100644 --- a/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m +++ b/ios/sdk/WeexSDK/Sources/Manager/WXTracingManager.m @@ -494,4 +494,15 @@ } } ++(void)destroyTraincgTaskWithInstance:(NSString *)instanceId +{ + if(![self isTracing]){ + return ; + } + WXTracingTask *task = [[WXTracingManager sharedInstance].tracingTasks objectForKey:instanceId]; + if(task){ + [[WXTracingManager sharedInstance].tracingTasks removeObjectForKey:instanceId]; + } +} + @end http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/3c2ce63f/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m ---------------------------------------------------------------------- diff --git a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m index 2e13dbb..39645ca 100644 --- a/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m +++ b/ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m @@ -44,6 +44,7 @@ #import "WXPrerenderManager.h" #import "WXTracingManager.h" #import "WXJSExceptionProtocol.h" +#import "WXTracingManager.h" NSString *const bundleUrlOptionKey = @"bundleUrl"; @@ -355,6 +356,8 @@ typedef enum : NSUInteger { WXLogError(@"Fail to find instanceï¼"); return; } + [WXTracingManager destroyTraincgTaskWithInstance:self.instanceId]; + [WXPrerenderManager removePrerenderTaskforUrl:[self.scriptURL absoluteString]]; [WXPrerenderManager destroyTask:self.instanceId]; @@ -375,6 +378,7 @@ typedef enum : NSUInteger { if(url.length > 0){ [WXPrerenderManager addGlobalTask:url callback:nil]; } + } - (void)forceGarbageCollection