Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resources...

Status
Not open for further replies.

DrkPaladin

Programmer
May 18, 2002
33
CA
What would be the easiest way to delete variable so I can save my resources???

Thanks.
 
Please Help, I do not have much time left...(5 Days)
 
What do you really mean? Do you mean delete a variable in the program that you alloc in advance? then just write "delete variable" will be ok.
 
I can't use delete Variable because they are not pointers... I have many variables and they use up too much of my resources... I need a way to save my resources so I do not run out of memory...

Thanks.
 
If your resources are having problems and it is only because you have too many variables declared, I think you have a bigger issue on your hand. Just how many variables are we talking about? How are they declared? Where are they declared? Check for memory leaks. Unless you have millions of variables all over the place, it should not be an issue.

Matt
 
Most of my dialogs(15 dialogs) have about 10 variables(different name but same purpose)... There's is one that I use a lot that has about 50 variables... It's this one that takes up all my Resources(Memory). I go from dialog to dialog constantly...

Thanks.
 
In resource editor, open ClassWizard. Go to "Member Variables" tab, select the variables you want to delete and click "Delete Variable" button.

Recompile your code and fixed member functions that uses the variable.

You can associate more than one type of object to each control. For example, for an Edit control, you can associate it to a CString type of a CEdit type. Depends on your usage, you normally needs one or the other, hardly both. If you only use standard windows feature like GetWindowText and SetWindowText, you don't even need to associate the control to any variable, just use GetDlgItem(…)->GetWindowText(…).

I am not sure if this really help.

Shyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top