Technically works with 1.2, but it seems like some stuff was changed, as for example during comparison it treats some values as 0, constantly dropping 'Value cannot be null' error in the chat. Also, it takes time to sell stuff in bulk.
Yes, it is very possible to have memory leaks in C# if you don't dispose disposable objects. While C# is a managed language with automatic garbage collection, which helps in memory management by automatically reclaiming memory that is no longer in use, memory leaks can still occur if developers are not careful. Memory leaks in C# usually happen when objects that are no longer needed are still held in memory, preventing the garbage collector from reclaiming that memory. This can happen due to various reasons, some of which include:
1. Not releasing unmanaged resources: If your C# code uses unmanaged resources (e.g., file handles, database connections, etc.), it is essential to properly release these resources when they are no longer needed. Failure to do so can lead to memory leaks. 2. Event subscriptions: When you subscribe to events in C#, objects that are subscribed to events can still be kept in memory even if they are no longer needed, causing memory leaks. You need to unsubscribe from events when an object is no longer required. 3. Static references: Objects referenced as static members can persist in memory for the entire lifetime of the application, even if they are no longer needed. Care should be taken when using static members to avoid unintentional memory retention. 4. Circular references: If you have circular references between objects, the garbage collector might not be able to determine that these objects are unreachable, and they will remain in memory.
To avoid memory leaks in C#, developers should follow best practices for managing resources, properly dispose of objects that implement `IDisposable`, and ensure they understand the lifetime of objects in their application. Utilizing tools like memory profilers can also help identify potential memory leaks and bottlenecks in your code.
64 comments
might still be buggy tho
Is it compatible with v1.2.+ or it will cause crashes and incompatibilities?
Thanks!
Also, it takes time to sell stuff in bulk.
Even so, the mod is written in C#. Memory leaks aren't a thing in C#.
Yes, it is very possible to have memory leaks in C# if you don't dispose disposable objects. While C# is a managed language with automatic garbage collection, which helps in memory management by automatically reclaiming memory that is no longer in use, memory leaks can still occur if developers are not careful.
Memory leaks in C# usually happen when objects that are no longer needed are still held in memory, preventing the garbage collector from reclaiming that memory. This can happen due to various reasons, some of which include:
1. Not releasing unmanaged resources: If your C# code uses unmanaged resources (e.g., file handles, database connections, etc.), it is essential to properly release these resources when they are no longer needed. Failure to do so can lead to memory leaks.
2. Event subscriptions: When you subscribe to events in C#, objects that are subscribed to events can still be kept in memory even if they are no longer needed, causing memory leaks. You need to unsubscribe from events when an object is no longer required.
3. Static references: Objects referenced as static members can persist in memory for the entire lifetime of the application, even if they are no longer needed. Care should be taken when using static members to avoid unintentional memory retention.
4. Circular references: If you have circular references between objects, the garbage collector might not be able to determine that these objects are unreachable, and they will remain in memory.
To avoid memory leaks in C#, developers should follow best practices for managing resources, properly dispose of objects that implement `IDisposable`, and ensure they understand the lifetime of objects in their application. Utilizing tools like memory profilers can also help identify potential memory leaks and bottlenecks in your code.
Just give lots of text in the combat log. Something with value null
Edit. Usable if one don´t sell much. Takes a silly amount of time for the game to calculate when selling.