Commit d8ec48b9 by Daniel Dahan

development: issue-588: fixed GridAxis memory leak issue

parent 52657f40
Pod::Spec.new do |s| Pod::Spec.new do |s|
s.name = 'Material' s.name = 'Material'
s.version = '2.3.3' s.version = '2.3.4'
s.license = 'BSD-3-Clause' s.license = 'BSD-3-Clause'
s.summary = 'Material is an animation and graphics framework that is used to create beautiful applications.' s.summary = 'Material is an animation and graphics framework that is used to create beautiful applications.'
s.homepage = 'http://materialswift.com' s.homepage = 'http://materialswift.com'
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>FMWK</string> <string>FMWK</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>2.3.3</string> <string>2.3.4</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
......
...@@ -98,14 +98,14 @@ public class Grid { ...@@ -98,14 +98,14 @@ public class Grid {
} }
/// Offsets for rows and columns. /// Offsets for rows and columns.
public var offset: GridOffset { public var offset = GridOffset() {
didSet { didSet {
reload() reload()
} }
} }
/// The axis in which the Grid is laying out its views. /// The axis in which the Grid is laying out its views.
public var axis: GridAxis { public var axis = GridAxis() {
didSet { didSet {
reload() reload()
} }
...@@ -154,7 +154,7 @@ public class Grid { ...@@ -154,7 +154,7 @@ public class Grid {
} }
/// An Array of UIButtons. /// An Array of UIButtons.
public var views: [UIView] { public var views = [UIView]() {
didSet { didSet {
for v in oldValue { for v in oldValue {
v.removeFromSuperview() v.removeFromSuperview()
...@@ -174,9 +174,6 @@ public class Grid { ...@@ -174,9 +174,6 @@ public class Grid {
self.rows = rows self.rows = rows
self.columns = columns self.columns = columns
self.interimSpace = interimSpace self.interimSpace = interimSpace
offset = GridOffset()
axis = GridAxis()
views = []
} }
/// Begins a deferred block. /// Begins a deferred block.
......
...@@ -55,7 +55,7 @@ public class NavigationItem: NSObject { ...@@ -55,7 +55,7 @@ public class NavigationItem: NSObject {
public private(set) lazy var detailLabel = UILabel() public private(set) lazy var detailLabel = UILabel()
/// Left items. /// Left items.
public var leftViews: [UIView] { public var leftViews = [UIView]() {
didSet { didSet {
for v in oldValue { for v in oldValue {
v.removeFromSuperview() v.removeFromSuperview()
...@@ -65,7 +65,7 @@ public class NavigationItem: NSObject { ...@@ -65,7 +65,7 @@ public class NavigationItem: NSObject {
} }
/// Right items. /// Right items.
public var rightViews: [UIView] { public var rightViews = [UIView]() {
didSet { didSet {
for v in oldValue { for v in oldValue {
v.removeFromSuperview() v.removeFromSuperview()
...@@ -105,9 +105,7 @@ public class NavigationItem: NSObject { ...@@ -105,9 +105,7 @@ public class NavigationItem: NSObject {
/// Initializer. /// Initializer.
public override init() { public override init() {
leftViews = [] super.init()
rightViews = []
super.init()
prepareTitleLabel() prepareTitleLabel()
prepareDetailLabel() prepareDetailLabel()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment