Skip to content

Commit 8040a87

Browse files
committed
removed abstract from ondispose method
1 parent f3efbc6 commit 8040a87

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

docs/_sidebar.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,7 @@
1010
- Guides
1111

1212
- [Coding Guide](https://benhar-dev.github.io/coding-convention/#/)
13+
14+
- Versions
15+
16+
- [Changelog](changelog.md)

docs/changelog.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Changelog
2+
3+
## 0.2.1
4+
5+
### Disposable
6+
7+
- Removed ABSTRACT from Disposable OnDispose. This removes the requirement from the end user to implement the OnDispose if the child class has no requirement for it. You would still look to extend from Disposable to handle the usual lifecycle of disposing and deleting of the object.

docs/disposable.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ N/A
5959
myObject.Dispose()
6060
```
6161

62-
### Abstract OnDispose() : BOOL;
62+
### Protected OnDispose() : BOOL;
6363

64-
This method must be implemented by the concrete class.
64+
This method should be implemented by the concrete class if that class needs to dispose of other components.
6565

6666
OnDispose will be called explicitly by the Dispose() method, or from someone calling \_\_DELETE on the object, or by TwinCAT when it destroys the object.
6767

src/mobject-disposable-library/mobject-disposable/mobject-disposable/Disposable/Disposable.TcPOU

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ END_IF]]></ST>
5656
</Implementation>
5757
</Method>
5858
<Method Name="OnDispose" Id="{349cfa6c-1d32-4721-9a07-8f628551b64b}" FolderPath="Protected\">
59-
<Declaration><![CDATA[METHOD PROTECTED ABSTRACT OnDispose : BOOL
59+
<Declaration><![CDATA[METHOD PROTECTED OnDispose : BOOL
6060
VAR_INPUT
6161
CalledExplicitly : BOOL; // true if disposal was triggered from Dispose()
6262
END_VAR

src/mobject-disposable-library/mobject-disposable/mobject-disposable/mobject-disposable.plcproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<Company>mobject</Company>
1919
<Released>false</Released>
2020
<Title>mobject-disposable</Title>
21-
<ProjectVersion>0.2.0</ProjectVersion>
21+
<ProjectVersion>0.2.1</ProjectVersion>
2222
<DefaultNamespace>mobject-disposable</DefaultNamespace>
2323
<Author>mobject dev team</Author>
2424
<LibraryCategories>

0 commit comments

Comments
 (0)