Thanks for the guess and the long post, Fuzz.
In the mean time, please try my game, because I have another problem here:
- Running the executable file on a diffirent machine than mine pops out an error message:
Application has generated an exception that could not be handled
This is not the topic, but please have a look as well. I think the problem is i'm using VS.NET 2002 to build.
[.net] How do I improve memory usage in C# ?
I get a generic "JIT debugging component registration is incorrect" error message. I have .Net 1.1 (not 1.0, i'm not sure if that matters) and the June release of managed DX installed.
Hey I've fixed it.
It's a problem with VS.NET 2002. Now everything's running smooth.
I've taken a look over to the memory issue, but seems like nothing's wrong. If someone could test my game again to see if there are any trouble, i'd be most appreciate.
It's a problem with VS.NET 2002. Now everything's running smooth.
I've taken a look over to the memory issue, but seems like nothing's wrong. If someone could test my game again to see if there are any trouble, i'd be most appreciate.
!@#$, it hasn't been fixed yet. I've try it on several PC, but only a few works. The error messages are different on different machines, and don't know how to get it all together.
So anyone out there, please try to download my game and run it. I want to make sure that my game can run smoothly on EVERY PC, so that everyone can play.
Change the file name to .zip after you download
So anyone out there, please try to download my game and run it. I want to make sure that my game can run smoothly on EVERY PC, so that everyone can play.
Change the file name to .zip after you download
Worked flawlessly here. Nice work btw!
OS: Windows XP SP2
DirectX: 9.0c
.NET: 1.1 and 2.0 Beta installed
OS: Windows XP SP2
DirectX: 9.0c
.NET: 1.1 and 2.0 Beta installed
Thank you, joanusdmentia, it really boost my spirit. You're the first "stranger" to play my game. Well now we're not strangers anymore ;)
You have the exact same runtimes as I do. Maybe that's the key. Anyone else want to try out?
You have the exact same runtimes as I do. Maybe that's the key. Anyone else want to try out?
Quote:Original post by vincent_valentineQuote:Original post by Holy Fuzz
What this means is that even if YOU don't reference them, D3D still does, and they won't be disposed until the D3D device is disposed. So yes, if you want to destroy these sooner, you'll have to call dispose yourself on them. This is a problem that acounted for a huge memory leak in my application that took me forevery to fix, so watch out.
Holy Fuzz, can you explain it more clearly? This seems like an interesting experience...
In my game app, I've tried not to call Dispose() manually, and the memory effect remains the same. So they're called automatically anyway, true.
Anyway, here's the link to the post to download my game, it's called Tetris#
Link to my game
C# has a nice keyword for automatically disposing of IDisposable objects 'using'.
example:
using (MyDisposableObj tempObj = new MyDisposableObj ())
{
tempObj.Foo();
}
When using goes out of scope, Dispose() is automatically called on tempObj.
Great. Holy Fuzz was able to play, so I think the problem has been fixed.
Actually, yesterday I was looking around, typing the exact error message in Google. I found a site which said: The Managed DirectX sometimes failed to install, causing File or assembly not found error. This problem has been fixed since the June update. I only have the Feb update, so I think that I must get a newer SDK of DirectX.
@Madmunki: I knew of the pattern you shown. It's just hard to fit in some situation. But it's good when you knew exactly how the object will be release.
To sum it all up I think the solution is to use the "new" keyword with caution.
I found the Dispose() implementation sample in the MSDN. I'll post it here:
Actually, yesterday I was looking around, typing the exact error message in Google. I found a site which said: The Managed DirectX sometimes failed to install, causing File or assembly not found error. This problem has been fixed since the June update. I only have the Feb update, so I think that I must get a newer SDK of DirectX.
@Madmunki: I knew of the pattern you shown. It's just hard to fit in some situation. But it's good when you knew exactly how the object will be release.
To sum it all up I think the solution is to use the "new" keyword with caution.
I found the Dispose() implementation sample in the MSDN. I'll post it here:
/// <summary> /// Dispose the object /// </summary> public void Dispose() { Dispose(true); // Take yourself off of the Finalization queue // to prevent finalization code for this object // from executing a second time. GC.SuppressFinalize(this); } // Dispose(bool disposing) executes in two distinct scenarios. // If disposing equals true, the method has been called directly // or indirectly by a user's code. Managed and unmanaged resources // can be disposed. // If disposing equals false, the method has been called by the // runtime from inside the finalizer and you should not reference // other objects. Only unmanaged resources can be disposed. protected virtual void Dispose(bool disposing) { if (disposing) { // Dispose unmanaged resources here } this.managedResource.Dispose(); }
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement