Jump to content
xisto Community
Sign in to follow this  
switch

Big C++ Problem

Recommended Posts

hi, i have a problem, im not gunna post the source code cause its huge :angry:anyways i am writing a 3d model editor. i have 2 versions, materials and no materials.in my no materials version i can make as many polygons as i want, on my other one i can make three and then it crashes making a material for the fourth one. i originally thought it was a memory problem and i had too much on the heap, but then again its all pointers and stuff, so i must be running out of memory some other way, even though i have 120 mb ram free!if that made sense to anyone :rolleyes: any ideas?greatly appreciated.

Share this post


Link to post
Share on other sites

I have no idea about that.But even though you've got 128MB RAM,no one program can use up all of them.It's impossible to let one program control all of the RAM, the operating system controls this.In old time,DOS mode,It's only 64KB,or even less.

Share this post


Link to post
Share on other sites

are you sure you don't have any memory leaks. You must close all objects after you are done using them otherwise they stay in memory. If you don't you could choose to use virtual memory (using the HD to story temporary stuff).

Share this post


Link to post
Share on other sites

thanks timstockman, i think i may have had a memory leak. i had a constructor that deleted a pointer. the problem was that the pointer didn't point to anything i had created (if that makes sense) so i fixed this and my program seemed to work fine. thanks heaps for you help everyone :rolleyes: cheers

Share this post


Link to post
Share on other sites

I have no idea about that.But even though you've got 128MB RAM,no one program can use up all of them.It's impossible to let one program control all of the RAM, the operating system controls this.In old time,DOS mode,It's only 64KB,or even less.

Share this post


Link to post
Share on other sites

yeah, i actually have 256 mb of ram, just i had 128 free when i was running it. this should allow my program to have a decent chunk of memory though right?anyways i have big plans for my model editor over the next few weeks, :) i'll post the website when its finished. thanks for your help everyone.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.