Skip to content

Commit

Permalink
memory fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Dorgans committed Aug 6, 2018
1 parent d3d5136 commit a64002e
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 65 deletions.
48 changes: 0 additions & 48 deletions Example/InfiniteLayout.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@
607FACCD1AFB9204008FA782 /* Frameworks */,
607FACCE1AFB9204008FA782 /* Resources */,
36EEEA4F62F7A41DC7E00F9B /* [CP] Embed Pods Frameworks */,
BF7EA699B063C96A45D69BF2 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -245,8 +244,6 @@
607FACE11AFB9204008FA782 /* Sources */,
607FACE21AFB9204008FA782 /* Frameworks */,
607FACE31AFB9204008FA782 /* Resources */,
066936A649BBA50B7D22FE7E /* [CP] Embed Pods Frameworks */,
56B85F2D241E5ED6DDCED73C /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -321,21 +318,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
066936A649BBA50B7D22FE7E /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InfiniteLayout_Tests/Pods-InfiniteLayout_Tests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
36EEEA4F62F7A41DC7E00F9B /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -364,21 +346,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InfiniteLayout_Example/Pods-InfiniteLayout_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
56B85F2D241E5ED6DDCED73C /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InfiniteLayout_Tests/Pods-InfiniteLayout_Tests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
BB5E5FB53E7C451064DBC9A2 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand All @@ -397,21 +364,6 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
BF7EA699B063C96A45D69BF2 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-InfiniteLayout_Example/Pods-InfiniteLayout_Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
DF297DCD753BC67E73166377 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
35 changes: 22 additions & 13 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
PODS:
- CocoaProxy (0.1.1)
- Differentiator (3.0.2)
- InfiniteLayout (0.1.6):
- CocoaProxy (~> 0.1)
- InfiniteLayout/Core (= 0.1.6)
- InfiniteLayout/Core (0.1.6):
- CocoaProxy (~> 0.1)
- InfiniteLayout/Rx (0.1.6):
- CocoaProxy (~> 0.1)
- RxCocoa (~> 4.0)
- RxDataSources (~> 3.0)
- RxSwift (~> 4.0)
- InfiniteLayout (0.2.3.1):
- CocoaProxy (~> 0)
- InfiniteLayout/Core (= 0.2.3.1)
- InfiniteLayout/Core (0.2.3.1):
- CocoaProxy (~> 0)
- InfiniteLayout/Rx (0.2.3.1):
- CocoaProxy (~> 0)
- InfiniteLayout/Core (~> 0)
- RxCocoa (~> 4)
- RxDataSources (~> 3)
- RxSwift (~> 4)
- RxCocoa (4.1.0):
- RxSwift (~> 4.0)
- RxDataSources (3.0.2):
Expand All @@ -23,18 +24,26 @@ DEPENDENCIES:
- InfiniteLayout (from `../`)
- InfiniteLayout/Rx (from `../`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- CocoaProxy
- Differentiator
- RxCocoa
- RxDataSources
- RxSwift

EXTERNAL SOURCES:
InfiniteLayout:
:path: ../
:path: "../"

SPEC CHECKSUMS:
CocoaProxy: 35ab81e24325b33834cffe45a3d1fd48ca67ef3a
Differentiator: a87be69eba49ec4ab460c7671143ee3a9eececfd
InfiniteLayout: 27a10e0a766122807a73740b5e7c7384fcdc37a2
InfiniteLayout: 17bbab705aa4d941fa82a7e9b658c96d13ce91a3
RxCocoa: cc1fec49cdc8fabe645964de7c51c099a36c2aa8
RxDataSources: cb7c31e652a87ebb919da45f716bbb87b3765f6b
RxSwift: 4219941c1244c88002901bd87a69d3aea9ae71f0

PODFILE CHECKSUM: 3501aeed91e62112dd38178a52f26b204b97c8c0

COCOAPODS: 1.4.0.rc.1
COCOAPODS: 1.5.3
2 changes: 1 addition & 1 deletion InfiniteLayout.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'InfiniteLayout'
s.version = '0.2.3.1'
s.version = '0.2.3.2'
s.summary = 'Horizontal and Vertical infinite scrolling feature for UICollectionView with Paging, NSProxy delegate, Reactive extension'

# This description is used to generate tags and improve search results.
Expand Down
6 changes: 3 additions & 3 deletions InfiniteLayout/Classes/InfiniteCollectionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ open class InfiniteCollectionView: UICollectionView {
lazy var dataSourceProxy = InfiniteCollectionViewDataSourceProxy(collectionView: self)
lazy var delegateProxy = InfiniteCollectionViewDelegateProxy(collectionView: self)

@IBOutlet open var infiniteDelegate: InfiniteCollectionViewDelegate?
@IBOutlet open weak var infiniteDelegate: InfiniteCollectionViewDelegate?

open private(set) var centeredIndexPath: IndexPath?
open var preferredCenteredIndexPath: IndexPath? = IndexPath(item: 0, section: 0)

var forwardDelegate: Bool { return true }
var _contentSize: CGSize?

override open var delegate: UICollectionViewDelegate? {
override open weak var delegate: UICollectionViewDelegate? {
get { return super.delegate }
set {
guard forwardDelegate else {
Expand All @@ -45,7 +45,7 @@ open class InfiniteCollectionView: UICollectionView {
}
}

override open var dataSource: UICollectionViewDataSource? {
override open weak var dataSource: UICollectionViewDataSource? {
get { return super.dataSource }
set {
guard forwardDelegate else {
Expand Down
4 changes: 4 additions & 0 deletions InfiniteLayout/Classes/InfiniteCollectionViewProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class InfiniteCollectionViewProxy<T: NSObjectProtocol>: CocoaProxy {
super.init(proxies: [])
self.collectionView = collectionView
}

deinit {
self.proxies.removeAll()
}
}

class InfiniteCollectionViewDelegateProxy: InfiniteCollectionViewProxy<UICollectionViewDelegate>, UICollectionViewDelegate {
Expand Down

1 comment on commit a64002e

@arnauddorgans
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#1

Please sign in to comment.