Go to Post Each year that I've been on the team I've thought to myself, "Man we lost some great seniors this year," and each year younger students have stepped up on their own to fill those leadership positions. - BJC [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 11-11-2012, 10:57
Itamar's Avatar
Itamar Itamar is offline
Registered User
FRC #1943 (NeatTeam) & FRC #4590 (GreenBlitz)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Israel
Posts: 83
Itamar is an unknown quantity at this point
Do I need to delete the Command objects?

Ahoy ahoy!

This year our team decided to work with C++. I was reading this excellent pdf when a thought occoured to me: do I need to clear the memory of all the Command instances I create? If so, will it work to simply write "delete this;" at the "end" method?

Or maybe creating instances during runtime is not right at all, and all Commands should be created at the beginning and re-used while the robot runs?

Thank you,
Itamar
Reply With Quote
  #2   Spotlight this post!  
Unread 25-11-2012, 21:08
mythbusterma mythbusterma is offline
Registered User
no team
 
Join Date: Nov 2012
Rookie Year: 2009
Location: ----
Posts: 10
mythbusterma is an unknown quantity at this point
Re: Do I need to delete the Command objects?

It seems that by the way they implement commands, the commands automatically lose scope after they finish executing, and hence are deleted.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 02:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi