about resources and the using

Hi!

GC removes objects when the GC decides so because C# is managed.
At the bottom I have a code snipped.
The book I read say Always call Dispose() on Pen objects or use the using 
feature on the Pen object.
I mean C# is managed so I can't understand why I should dispose the Pen 
object. GC should take care of this.
The reason is probably that I mixup memory and resources. GC take care of 
free memory but not resources.
I have some problem to understand why I must dispose the Pen object here 
because I see the Pen object as
any object such as a Person or Car.

So my first question is can I use the rule that say always dispose an object 
where the class implements the IDisposable which actually mean that I have 
to check if the class implements the IDisposable ?
My second question is if I don't dispose the Pen object will a lot of 
resources be allocated that will affect the application and what kind of 
resources is that ?
I don't think that the amount of resources is that limited. I mean that it 
would have been a considerably different situation if I had to create many 
,many Pen object but here I just create a single one.

protected override void OnPaint(PaintEventArgs e)
      {
         Graphics g = e.Graphics;
         Pen blackPen = new Pen(Color.Black, 1);

         if (ClientRectangle.Height / 10 > 0)
         {
            for (int y = 0; y < ClientRectangle.Height; y+= 
ClientRectangle.Height/10)
            {
                 g.DrawLine(blackPen, new Point(0,0), new 
Point(ClientRectangle.Width,y));
            }
         }
      }

//Tony 


0
Tony
4/5/2010 10:57:17 AM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

7 Replies
1028 Views

Similar Articles

[PageSpeed] 8

> GC removes objects when the GC decides so because C# is managed.
> At the bottom I have a code snipped.
> The book I read say Always call Dispose() on Pen objects or use the using 
> feature on the Pen object.
> I mean C# is managed so I can't understand why I should dispose the Pen 
> object. GC should take care of this.

As you said if you let the GC do that, it will happen at a time out of your 
control (possibly not before it is needed). By calling this explicitely (or 
implicitely using "using") you'll control when it is done.

> I have some problem to understand why I must dispose the Pen object here 
> because I see the Pen object as
> any object such as a Person or Car.

A Pen also uses other resources so disposing a Pen does a bit more than just 
releasing memory.

> So my first question is can I use the rule that say always dispose an 
> object where the class implements the IDisposable which actually mean that 
> I have to check if the class implements the IDisposable ?

If the class have a Dispose or Close method, it's best to call it as soon as 
you are done with the class...

To take a comparison, will you wait for your app to terminate to close a 
file even if you don't ever need it any more. Likely not, you'll close the 
file as soon as you are done with it.

> My second question is if I don't dispose the Pen object will a lot of 
> resources be allocated that will affect the application and what kind of 
> resources is that ?
> I don't think that the amount of resources is that limited. I mean that it 
> would have been a considerably different situation if I had to create many 
> ,many Pen object but here I just create a single one.

A single one nut each time your code is called so at some point you could 
have problems even if we are no more on Windows 3.1.

IMO it's not even worth to known. Either keep the same pen handy or properly 
dispose it. You shouln't relly on knowing about how a paticular resource 
behaves.

If I remember a tool such as 
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx should allow 
to show how much handles you are consuiming. It would be also easy to create 
a test app to see at whihc point you are stuck when creating Pens. Even if 
the limit is high, IMO this is not  a reason for letting things being 
uncontrolled...

--
Patrice 

0
Patrice
4/5/2010 11:22:31 AM
"Tony Johansson" <johansson.andersson@telia.com> wrote in message 
news:eEvz86K1KHA.5004@TK2MSFTNGP05.phx.gbl...
>         Pen blackPen = new Pen(Color.Black, 1);

    A suggestion: if instead of the quoted line you do the following:

         Pen blackPen = Pens.Black;

    then you get a statically allocated pen and you don't have to worry 
about disposing de pen. Otherwise, it is a good idea to Dispose it, because 
you are doing the allocation inside the OnPaint method which could 
potentially execute thousands of times, so you would be wasting thousands of 
pens before the GC runs.

0
Alberto
4/5/2010 12:34:45 PM
"Alberto Poblacion" <earthling-quitaestoparacontestar@poblacion.org> skrev i 
meddelandet news:uMsbpxL1KHA.220@TK2MSFTNGP06.phx.gbl...
> "Tony Johansson" <johansson.andersson@telia.com> wrote in message 
> news:eEvz86K1KHA.5004@TK2MSFTNGP05.phx.gbl...
>>         Pen blackPen = new Pen(Color.Black, 1);
>
>    A suggestion: if instead of the quoted line you do the following:
>
>         Pen blackPen = Pens.Black;
>
>    then you get a statically allocated pen and you don't have to worry 
> about disposing de pen. Otherwise, it is a good idea to Dispose it, 
> because you are doing the allocation inside the OnPaint method which could 
> potentially execute thousands of times, so you would be wasting thousands 
> of pens before the GC runs.
>

Very good point

//Tony 


0
Tony
4/5/2010 1:10:35 PM
"Alberto Poblacion" <earthling-quitaestoparacontestar@poblacion.org> skrev i 
meddelandet news:uMsbpxL1KHA.220@TK2MSFTNGP06.phx.gbl...
> "Tony Johansson" <johansson.andersson@telia.com> wrote in message 
> news:eEvz86K1KHA.5004@TK2MSFTNGP05.phx.gbl...
>>         Pen blackPen = new Pen(Color.Black, 1);
>
>    A suggestion: if instead of the quoted line you do the following:
>
>         Pen blackPen = Pens.Black;
>
>    then you get a statically allocated pen and you don't have to worry 
> about disposing de pen. Otherwise, it is a good idea to Dispose it, 
> because you are doing the allocation inside the OnPaint method which could 
> potentially execute thousands of times, so you would be wasting thousands 
> of pens before the GC runs.
>

Hi!

I have changed a little just to test the amout of resources that I have when 
creating a lot of Pen object.
I hid and show the screen so this OnPaint overridden method was called 10 
times and I didn't notice any kind resource problem.
Notice also that each call to the OnPaint will create 100000 Pen object in 
the for loop.
So the amount of resources seems to be almost infinite.

So according to my calculations I created 1000000 Pen object without any 
kind of resource problem what so ever.
Can somebody give me a comment about this test ?

Protected override void OnPaint(PaintEventArgs e)
      {
         Console.WriteLine("i= {0}", count++);
         GraphicsPath path = new GraphicsPath();

         Graphics g = e.Graphics;
         Pen blackPen = new Pen(Color.Black,1);
         for (int i = 0; i < 100000; i++)
         {
             blackPen = new Pen(Color.Black, 1);
         }

         if (ClientRectangle.Height / 10 > 0)
         {
            for (int y = 0; y < ClientRectangle.Height; y += 
ClientRectangle.Height / 10)
            {
               g.DrawLine(blackPen, new Point(0, 0), new 
Point(ClientRectangle.Width, y));
            }
         }
      } 


0
Tony
4/5/2010 1:42:30 PM
"Tony Johansson" <johansson.andersson@telia.com> wrote in message 
news:eEvz86K1KHA.5004@TK2MSFTNGP05.phx.gbl...

>         Pen blackPen = new Pen(Color.Black, 1);

I just want to mention something here: if it is your intention to create a 
pen which will draw lines exactly one pixel in size, this is not the correct 
way to do it. A size of 1 could, believe it or not, cause lines greater than 
1 pixel wide to be drawn. To get exactly 1 pixel, use -1 for the size 
argument. This is documented in the Pen's constructor. 


0
Jeff
4/5/2010 1:45:52 PM
It's possible that not using a pen or creating a pen with always the same 
characteristics is optimized or even that limitations in previous OS are 
gone.

As I said earlier IMO it doesn't matter as testing each and every disposable 
resource and relying on their indiviual behavior is not doable in practice.

IMO if a resource is disposable, just dispose it.

--
Patrice

"Tony Johansson" <johansson.andersson@telia.com> a �crit dans le message de 
news:eWm%23QXM1KHA.3412@TK2MSFTNGP05.phx.gbl...
>
> "Alberto Poblacion" <earthling-quitaestoparacontestar@poblacion.org> skrev 
> i meddelandet news:uMsbpxL1KHA.220@TK2MSFTNGP06.phx.gbl...
>> "Tony Johansson" <johansson.andersson@telia.com> wrote in message 
>> news:eEvz86K1KHA.5004@TK2MSFTNGP05.phx.gbl...
>>>         Pen blackPen = new Pen(Color.Black, 1);
>>
>>    A suggestion: if instead of the quoted line you do the following:
>>
>>         Pen blackPen = Pens.Black;
>>
>>    then you get a statically allocated pen and you don't have to worry 
>> about disposing de pen. Otherwise, it is a good idea to Dispose it, 
>> because you are doing the allocation inside the OnPaint method which 
>> could potentially execute thousands of times, so you would be wasting 
>> thousands of pens before the GC runs.
>>
>
> Hi!
>
> I have changed a little just to test the amout of resources that I have 
> when creating a lot of Pen object.
> I hid and show the screen so this OnPaint overridden method was called 10 
> times and I didn't notice any kind resource problem.
> Notice also that each call to the OnPaint will create 100000 Pen object in 
> the for loop.
> So the amount of resources seems to be almost infinite.
>
> So according to my calculations I created 1000000 Pen object without any 
> kind of resource problem what so ever.
> Can somebody give me a comment about this test ?
>
> Protected override void OnPaint(PaintEventArgs e)
>      {
>         Console.WriteLine("i= {0}", count++);
>         GraphicsPath path = new GraphicsPath();
>
>         Graphics g = e.Graphics;
>         Pen blackPen = new Pen(Color.Black,1);
>         for (int i = 0; i < 100000; i++)
>         {
>             blackPen = new Pen(Color.Black, 1);
>         }
>
>         if (ClientRectangle.Height / 10 > 0)
>         {
>            for (int y = 0; y < ClientRectangle.Height; y += 
> ClientRectangle.Height / 10)
>            {
>               g.DrawLine(blackPen, new Point(0, 0), new 
> Point(ClientRectangle.Width, y));
>            }
>         }
>      }
> 

0
Patrice
4/5/2010 2:17:34 PM
Patrice wrote:
> [...]
>> I have some problem to understand why I must dispose the Pen object 
>> here because I see the Pen object as
>> any object such as a Person or Car.
> 
> A Pen also uses other resources so disposing a Pen does a bit more than 
> just releasing memory.

In particular, some important points those "other resources":

In most cases, when an object implements IDisposable, it's because 
either it owns other IDisposable objects, or it itself owns _unmanaged_ 
resources.

..NET currently only manages memory.  But one can imagine a .NET that 
manages other resources as well, such as file objects, network socket 
objects, COM objects, etc.  In such a utopian world, we wouldn't need 
IDisposable.

But we aren't in that utopian world.  And since there are resources on 
the computer other than memory, and since .NET manages only the memory 
resource, we need a way to help .NET out when it comes to knowing when 
those resources are no longer needed.

The other problem with those resources, besides the fact that .NET has 
no way to track them and know when they are ready to be released and 
whether the system is running low on them, is that they are much scarcer 
resources than memory.  Because of the way the OS uses them, for a 
variety of reasons you can can run out of many of those resources faster 
than you can run out of memory.

Without IDisposable, .NET could refrain from releasing those resources 
for a much longer time than is warranted, because not only does it not 
realize they even exist, even if it did, it has no way to know whether 
it's a good time to start release them (either because the system is 
running low, or because there's a good point in execution to take the 
time to release the unused ones).

>> So my first question is can I use the rule that say always dispose an 
>> object where the class implements the IDisposable which actually mean 
>> that I have to check if the class implements the IDisposable ?
> 
> If the class have a Dispose or Close method, it's best to call it as 
> soon as you are done with the class...

To be clear though: it is usually possible to know when writing the code 
that an object implements IDisposable.

It's not necessary to have a check in the code for IDiposable (e.g. 
"IDisposable disposable = myObject as IDisposable; if (disposable != 
null) disposable.Dispose();").  You just have to read the documentation 
and make sure the object is disposed of in code when the code is done 
with it (usually this can be done with "using"�but for objects that have 
to live longer than a single block of code, of course you'll have to do 
it explicitly).

Pete
0
Peter
4/5/2010 3:43:29 PM
Reply:

Similar Artilces:

resource usage 01-13-10
Hi there, Is it possible to display remaining work in the right hand Pane? I can display it in the left hand pane (the table section) but can't seem to find in the right hand pane (the timephased area). eg. I want total remaining work for each resources for each month Many thanks. -- lk50 ------------------------------------------------------------------------ lk50's Profile: http://forums.techarena.in/members/87282.htm View this thread: http://forums.techarena.in/microsoft-project/1292777.htm http://forums.techarena.in Nope. Remaining work is not a time...

about resources and the using
Hi! GC removes objects when the GC decides so because C# is managed. At the bottom I have a code snipped. The book I read say Always call Dispose() on Pen objects or use the using feature on the Pen object. I mean C# is managed so I can't understand why I should dispose the Pen object. GC should take care of this. The reason is probably that I mixup memory and resources. GC take care of free memory but not resources. I have some problem to understand why I must dispose the Pen object here because I see the Pen object as any object such as a Person or Car. So my first qu...

MCSD Resource
I have found a resource providing answers for examination questions being helpful in certifying for MCSD.... http://technical-talk.com/mc/mcsd/mcsd.asp ...

Outlook and Offline Folders using IMAP #2
I'm running Outlook 2007. It seams to support the IMAP protocol reasonably well. However, I can't figure out how to move messages between folders when I'm offline (it gives an error message saying I can't, see below). This same operation works fine in MS Windows Mail (the equivalent of Outlook Express that ships with Windows Vista) and Mozilla Thunderbird. It's clearly not a limitation of IMAP. I can download messages and read and delete them when I'm offline. I just can't move them between folders unless I'm online. Since Outlook synchronizes any change...

Test on Type in Resource Center
Hi, In Project Server 2007 SP2 In the Resource Center of PWA, I'm trying to filter on the resource's Type : Work, Material, Cost But the system reject any test on these words. It seems it's waiting for numeric values. Have you any idea to test on this Type field? Thanks Robert -- Even though the Type field displays text data, the underlying data is actually numeric. So, you have to test for the following numbers in your Filter: Work resource = 0 Material resource = 1 Cost resource =2 Hope this helps. -- Dale A. Howar...

Converting resources in Exchange 5.5 to be compatable with Outlook 2003!
Hi all, We running a NT4 Enviroment with Exchange 5.5 and and clients such as Outlook 2000 and 2002 originally this was Inbox but over the years we have uppgraded. OS's are 2K and XP. All working fine untill we starting installing Office 2003 with Outlook 2003 and now we canot use resources like calendar in Exchange 5.5 we can happy create new ones. Does anyone have best way of upgrading resources to be compatable with Office 2003. In a about 4 mounths we going to Exchange 2003 but untill then I need a quick fix :-) Thank you very much, Laz. Laz: Are you referring to automatic bo...

how can I creat venn diagram using Excel?
I want to analysis data using excel. my idea is to find tht overlaping between different groups. How can I find the overlaping among differnt groups using Excel? I think Venn diagram will do such job but how to do that with Excel. thanks Consider simulating a Venn diagram with a Bubble chart. You will have to devise a scheme to specify the location (X,Y coordinates) and the size of each bubble to get the desired effect. -- Regards, Tushar Mehta www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <00499137-A889-4ABB...

Resource Capacity Planning
I'm looking for an Excel application that illustrates resources availability by week over time (3-6 months) Try: http://archive.baarns.com/software/ Click Software > On-Line Catalog > Excel Software > Management Software Scroll down and look for "Scheduler" (free excel file) "Paul Hipgrave" <phipgrave@rogers.com> wrote in message news:LHsmb.50236$h61.14914@news01.bloor.is.net.cable.rogers.com... > I'm looking for an Excel application that illustrates resources availability > by week over time (3-6 months) > > ...

How do Resource Groups relate to Resources
I am trying to figure out the linking table / GUID that connects Resource Groups to Resources/Users. Does anyone know what table in CRM connects these two? There isn't one. The group membership is defined in an XML document that is stored in the Constraints field of the ConstraintBasedGroupBase table (which is linked to ResourceGroup by them both having the same primary key value) -- David Jennaway - Microsoft Dynamics CRM MVP Web: http://www.excitation.co.uk Blog: http://mscrmuk.blogspot.com/ "BCote" wrote: > I am trying to figure out the linking table / GUID tha...

Resource file (rc) units
Hello, I am currently trying to port a MFC app to the wxWindows API. My problem is I would like to convert a rc file to the wxwindows resource format but I don't understant units used in MS file. Ex : IDD_LECTEUR_DIALOG DIALOGEX 0, 0, 679, 471 STYLE DS_ABSALIGN | DS_SETFONT | DS_MODALFRAME | WS_POPUP | WS_VISIBLE EXSTYLE WS_EX_APPWINDOW FONT 8, "MS Sans Serif", 0, 0, 0x1 BEGIN CONTROL "",IDC_PANEL_CENTRAL,"Static",SS_LEFTNOWORDWRAP | WS_GROUP,5,117,667,236 LTEXT "",IDC_STATIC_PANEL,36,138,593,195,0,WS_EX_...

Using combobox results when bound field is null
Access 2003: This combobox is a list of all the teachers, and also displays the number of children, and the number of families assigned to each teacher. Some children do not have a teacher assigned yet. The drop-down list, and the query it is based upon, correctly displays a null in the Teacher column, and the correct count of children and families in columns(1) and (2). However, when I look at the value of cboTeachers.Column(1) or cboTeachers.Column(2) in the Immediate window, the Locals window, or passed in a Message Box, they all show up as null values. I'd like to get a coun...

Calendaring / Resources in 2K7?
Hey guys, Is there anything for resources built into E2K7? Are we still to use some sort of auto accept? Thanks, D On Thu, 14 Sep 2006 09:19:02 -0700, Dan <Dan@discussions.microsoft.com> wrote: >Hey guys, > Is there anything for resources built into E2K7? Are we still to use some >sort of auto accept? >Thanks, >D Much of that will be built-in: http://www.microsoft.com/exchange/evaluation/features.mspx Yep - works well, too. I blogged about the Calendar Concierge capability a while back. http://winzenz.blogspot.com/2006/06/exchange-2007-calendar-concierge.ht...

HOWTO Use CHttpServerContext to read in Posted data and Svr Variab
HOWTO Use CHttpServerContext to read in Posted data and Svr Variables. Please help, I'm trying to make an ISAPI Extension with MFC. I need to copy all posted HTTP/FORM data into seperate data structures. I can not get a clear answer on how to do this from the MSDN documentation. I envision a simple FOR-LOOP with ReadClient to get the HTTP/FORM data, but the ReadClient I take it will BLOCK until all data I ask to read in comes from the client, and there appears to be no way of knowing how much data the client has sent. After that problem, I have the same issue with Server Variables...

A useful tool for use with Visio (or almost any program)
For a while I've wanted to create a demo of the operation of some of my software products and someone recommended a program called Wink for creating Shockwave Flash files, well, I've finally tried it out with Visio and it works really nicely. It would certainly provide a very useful way of showing dynamic screenshots of problems or ways of doing something that couldn't be shown with a single image file. I've got a demo of the output from Wink at http://www.gane-sarson.sandrila.co.uk/ and click on the Shockwave Flash demo link You can get Wink at: http://www.debugmode.com/win...

Using a combo box to search for a record
Hi all I am using Access 2007. My Table named Debtors has the following field Surname as a Text field My RowSource is :- SELECT DISTINCTROW [Debtors].[Surname] FROM Debtors ORDER BY [Surname]; My After Update Event Procedure is :- Private Sub Combo76_AfterUpdate() DoCmd.ShowAllRecords Me!txtSurname.SetFocus DoCmd.FindRecord Me!Combo76 Me!Combo76.Value = "" End Sub and I get the following error message................. Run-time error '2465' Access can't find the field 'txtSurname' Where have I gone wrong? Bob On S...

Creating MDI MFC application using CFormView class.
When I create by AppWizard in Visual Studio .NET 2003 MFC application with CFormView view class, when I choose the option the document frame window to be in maximized state after the application is started, the form view doesn't cover all the space of document frame window, just that of the size of dialog-template resource defined for form view. When I minimalize the document frame window and then maximize it, the form view occupies the entire area of maximized document frame window. Why isn't it so after the form view is first shown? Thanks for advise, ... ...

How to release resources hold by Creating Rescue Recovery process
In Windows XP SPK3, on IBM Laptop T60. I followed the instructions to create the rescue/recovery CDs. At one point, there was a window screen telling me to wait while it was extracting needed files. So, I waited. After more than 10 minutes (I thought), the window screen went away, then NOTHING was shown to tell me what to do (I supposed to get the window screen to tell me using the CD drive and insert blank CD, ..., etc.). I waited another 20 minutes and still nothing was shown. So I REBOOTED the system and retried the procedure. This time, after I clicked "creating...

How to get the resource from Resource Only Dll
hmod=LoadLibrary("testdll.dll"); hr=FindResource(hmod,MAKEINTRESOURCE(504),"GIF"); if(hr == NULL) MessageBox("This is not working"); else MessageBox("This is working"); here, i am try to get the image(gif) resource,which is stored in the dll(for example testdll.dll). Where as image resource type is "GIF" And resource ID is 504. But i am unable to find the resource. But when i try this FindResource(hmod,MAKEINTRESOURCE(501),RT_BITMAP); Where i have also stored an BITMAP file, and tried find the resource . i have succeded in th...

XL "zero-day" flaw used in Attacks
Came across this just this A.M. FYI http://news.zdnet.com/2100-1009_22-6084738.html?tag=nl.e589 -- Regards, RD ---------------------------------------------------------------------------- ------------------- Please keep all correspondence within the Group, so all may benefit ! ---------------------------------------------------------------------------- ------------------- RD, Thanks for posting that link. Jim Cone San Francisco, USA "RagDyeR" <ragdyer@cutoutmsn.com> wrote in message news:uvXrR2ikGHA.4368@TK2MSFTNGP03.phx.gbl... Came across this just this A.M. FYI ht...

A great tip to find folders quickly using Favourite Folders in Excel
Hi everyone. I came across this great little feature in Windows 7 to add folders and locations to the =93Favourites=94 in the Excel open/create dialog. With this neat little shortcut, you can add any folder you use often, and save you having to continually hunt around for it. I've blogged it here for you http://voato.com/office/find-folders-quickly-using-favourite-folders-in-win= dows-7/ ...

Use of the DSUM function
Who can give me a hand? I am using the function below; so far so good. DAvg("[wng_OPP_SLPK1]";"TBL_Woningen";"[wng_CFT Code] = """ & [pdt_CFT code] & """") Now I need to generate a sum on a field that contains the value "J". How can I change the function: Sum(IIf([TBL_Woningen]![wng_COD_INDCV]="J";1;0)) into a DSum function where the field to sum is wng_COD_INDCV (with the text "J"), the table TBL_Woningen and the criteria [wng_CFT Code] = """ & [pdt_CFT code] & "...

"Resource" has declined
One of my conference rooms returns this error for a few users but not all users. When scheduling a meeting according to the proper procedure, the resource is rejecting the meeting with the following error: "Resource" has declined your meeting because it is recurring. You must book each meeting separately with this resource. Note that: --The meeting is NOT recurring. --Other conference rooms do not exhibit this behaviour --No changes (that I am aware of) have been made to the exchange server or the resource account. ...

Using multiple cells as search pattern.
Hi, I'm using excel for an analysis of a communications protocol, and I would like to search for a pattern where two (or more) adjacent cells match some pattern. Say I want to look for the pattern 10|11 (i.e. 10 in cell1, 11 in the next cell in the column) - can that be done ? Regards Bo Rasmussen Bo, If your packets/blocks/whatever have been put into rows, and you're looking down two columns for this pattern, use Data - Advanced Filter. Or if you're using VLOOKUP, looking with multiple-field criteria can't be done directly. BUt you can "build" criteria by con...

Using XSD stored in assembly resource with includes
I am trying to validate an XML file against an XSD that is stored in the assembly as an embedded resource. I can get it to work as long as the XSD does not include other XSDs. After a fair amount of searching, I have found 3 possible solutions but none have worked for me. They are: 1. Use the Includes property of XmlSchema to add included XSDs, then call Compile XmlSchema mainSchema = XmlSchema.Read( stream1, null ); XmlSchema includeSchema1 = XmlSchema.Read( stream2, null ); XmlSchema includeSchema2 = XmlSchema.Read( stream3, null ); mainSchema.Includes.Add( includeSchema1 ...

Using STL with the debugger.
I am using Visual C++ version 6. In the debugger is there a way to view the contents of an STL container? Is there some trick I don't know? Example: Right now my debugger is stopped in a class method. The class contains a data member which is an STL vector of a structure. In the debugger, in the "variables" window, in the "this" tab, I can see all of the class data members. For the vector I just see a few things about the vector, but not the actual data of the vector elements. I know that there are several elements in this vector. You can add entries to the aut...