-
-
Notifications
You must be signed in to change notification settings - Fork 8
Best practices
João Cardoso edited this page Dec 4, 2019
·
6 revisions
Sushi runs under the assumption that lower-case fields/proprieties are assigned by users, but capitalized ones are part of the class implementation. This is why Base clears all lower-case fields when a frame is :Reset
.
In short, ❌ DO NOT:
sushiframe.CapitalizedField = 10
sushiframe:Release()
✔️ Do instead:
sushiframe.lowerCaseField = 10
sushiframe:Release()
This ensures that your assigned field is reset on release and does not interfere when the frame is reused by another addon.
After fully developing your project, it's advised to not include the classes which you do not require. This measure will improve loading time and reduce RAM usage. For that purpose:
- Inside the directory of the library, navigate to
classes
. - On that particular folder structure, you will find a
.lua
file for each class. - Remove the unused ones.
This is the Sushi-3.1 wiki. Wiki Home