Beispiel #1
0
                void FreeImageResources( )
                {
                    // unload all resource
                    if (ListView != null && ListView.Adapter != null)
                    {
                        ((ListAdapter)ListView.Adapter).Destroy( );
                    }

                    // be sure to dump the existing news images so
                    // Dalvik knows it can use the memory
                    foreach (NewsEntry newsEntry in News)
                    {
                        if (newsEntry.Image != null)
                        {
                            newsEntry.Image.Recycle( );
                            newsEntry.Image.Dispose( );
                            newsEntry.Image = null;
                        }
                    }

                    if (Placeholder != null)
                    {
                        Placeholder.Recycle( );
                        Placeholder.Dispose( );
                        Placeholder = null;
                    }
                }
        void ReleaseDesignerOutlets()
        {
            if (ActionButton != null)
            {
                ActionButton.Dispose();
                ActionButton = null;
            }

            if (Placeholder != null)
            {
                Placeholder.Dispose();
                Placeholder = null;
            }

            if (TextView != null)
            {
                TextView.Dispose();
                TextView = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AddProjectOnboardingBubble != null)
            {
                AddProjectOnboardingBubble.Dispose();
                AddProjectOnboardingBubble = null;
            }

            if (DescriptionRemainingLengthLabel != null)
            {
                DescriptionRemainingLengthLabel.Dispose();
                DescriptionRemainingLengthLabel = null;
            }

            if (Placeholder != null)
            {
                Placeholder.Dispose();
                Placeholder = null;
            }

            if (StartDateButton != null)
            {
                StartDateButton.Dispose();
                StartDateButton = null;
            }

            if (TimeInput != null)
            {
                TimeInput.Dispose();
                TimeInput = null;
            }

            if (TimeInputTrailingConstraint != null)
            {
                TimeInputTrailingConstraint.Dispose();
                TimeInputTrailingConstraint = null;
            }

            if (TimeLabel != null)
            {
                TimeLabel.Dispose();
                TimeLabel = null;
            }

            if (TimeLabelTrailingConstraint != null)
            {
                TimeLabelTrailingConstraint.Dispose();
                TimeLabelTrailingConstraint = null;
            }

            if (BillableButton != null)
            {
                BillableButton.Dispose();
                BillableButton = null;
            }

            if (BillableButtonWidthConstraint != null)
            {
                BillableButtonWidthConstraint.Dispose();
                BillableButtonWidthConstraint = null;
            }

            if (BottomDistanceConstraint != null)
            {
                BottomDistanceConstraint.Dispose();
                BottomDistanceConstraint = null;
            }

            if (BottomOptionsSheet != null)
            {
                BottomOptionsSheet.Dispose();
                BottomOptionsSheet = null;
            }

            if (CloseButton != null)
            {
                CloseButton.Dispose();
                CloseButton = null;
            }

            if (DateTimeButton != null)
            {
                DateTimeButton.Dispose();
                DateTimeButton = null;
            }

            if (DescriptionTextView != null)
            {
                DescriptionTextView.Dispose();
                DescriptionTextView = null;
            }

            if (DoneButton != null)
            {
                DoneButton.Dispose();
                DoneButton = null;
            }

            if (ProjectsButton != null)
            {
                ProjectsButton.Dispose();
                ProjectsButton = null;
            }

            if (SuggestionsTableView != null)
            {
                SuggestionsTableView.Dispose();
                SuggestionsTableView = null;
            }

            if (TagsButton != null)
            {
                TagsButton.Dispose();
                TagsButton = null;
            }

            if (AddProjectBubbleLabel != null)
            {
                AddProjectBubbleLabel.Dispose();
                AddProjectBubbleLabel = null;
            }
        }